I would like to have two dropdown list search for my posting in my blog.

Example:
First dropdown list : Select Cuisine

Second dropdown list : Select Location

Then Search button.

I can't figure out the javescripts. Please help. Thank you so much!

I would like to have two dropdown list search for my posting in my blog.

Example:
First dropdown list : Select Cuisine

Second dropdown list : Select Location

Then Search button.

I can't figure out the javescripts. Please help. Thank you so much!

my code example :

<script language="javascript"> 
<!--// 
function ldMenu(mySubject) {
var Indx=mySubject;
with (document.form2.select2) 
{
document.form2.select2.options.length=0;
if (Indx==0)
{
options[0]=new Option("Pages appear here","");
}
if (Indx==1)
{
options[0]=new Option("Choose a Food","");
options[1]=new Option("1","http://tshirtslogy.blogspot.com/2010/10/food.html");
options[2]=new Option("2","http://tshirtslogy.blogspot.com/2010/10/food-2.html");
options[3]=new Option("3","http://tshirtslogy.blogspot.com/2010/10/food-3.html");
}
 
if (Indx==2)   
{  
options[0]=new Option("Choose a T shirt","");
options[1]=new Option("1","http://tshirtslogy.blogspot.com/2010/10/t-shirt.html");
options[2]=new Option("2","http://tshirtslogy.blogspot.com/2010/10/t-shirt-3.html");
options[3]=new Option("3","http://tshirtslogy.blogspot.com/2010/10/t-shirt-4.html");

}
 
 
form2.select2.options[0].selected=true;
}
 
}
//-->
</script> 

<form name="form1"> 
  <p><select name="select1" onchange="ldMenu(this.selectedIndex);" size="1"> 
    <option value selected />Select a category  
    <option value />Food
    <option value />T shirt 
   
  </select> </p> 
</form> 
 

<form name="form2" method="post" action enctype="text/plain"> 
  <p><select name="select2" onchange="goToPage()" size="1"> 
<option selected value="Select a page after selecting a subject" />Select a page after selecting a subject 
  </select> </p> 
</form>

Done! it's working now!

missing code :

<script language="JavaScript"> 
<!-- Hide from old browsers 
//Hide from Java Script 
function goToPage() 
{ 
PageIndex2=document.form2.select2.selectedIndex 
if (document.form2.select2.options[PageIndex2].value != "") 
{ 
location.href = document.form2.select2.options[PageIndex2].value;
} 
} 
//--> 
</script>

Hi, Guys

I still need help I tried to add but unable to use it may be there is some thing missing in the code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.