Gökhan Geyik Gökhan Geyik - 1 year ago 69
Javascript Question

Select Option Javascript

I have a project about Language School Website. It has lots of dealers.

If users select dealers, then click about us, I want redirect to about us page of SELECTED dealers.

How can I solve this problem using jQuery?

Thank you

<div class="blueBox">
<h2 class="title">Dealers</h2>
<span class="sortArea clearfix">
<a href="#" class="blueBt Bt">All Dealers</a>
<!--scroll dropdown-->
<form >
<select id="e1">
<option value="Education Center">Education Center</option>
<option value="Yenimahalle">Yenimahalle</option>
<option value="Demetevler">Demetevler</option>
<!--scroll dropdown-->
<div class="detail clearfix">
<h3 class="subTitle">Şube Seçiniz</h3>
<ul class="detailLinks">
<li><a class="one Bt" href="#">About US</a></li>
<li><a class="two Bt" href="#">Pictures</a></li>
<li><a class="three Bt" href="#">Personal</a></li>
<li><a class="four Bt" href="#">Contact Us</a></li>

Answer Source
  selected = $("option:selected","#e1").attr("value");
  window.location.href = aboutPage(selected);