Larry Vollmer
asked on
Building a URL
I have the following form - when the user clicks submit I want to build a link and go to that page. I am not sure how to do it, can anyone help me out?
<form name="FOOD" method="post" action="">
<p>
<select name="SearchCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL CITIES</option>
<option value="Airmont">Airmont</o ption>
<option value="Ardsley">Ardsley</o ption>
<option value="Armonk">Armonk</opt ion>
<option value="Baldwin Place">Baldwin Place</option>
</select>
</p>
<p>
<select name="SearchSubCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL TYPES</option>
<option value="American">American< /option>
<option value="Bakery">Bakery</opt ion>
<option value="Barbecue">Barbecue< /option>
<option value="Brazilian">Brazilia n</option>
</select>
</p>
<p>
<input type="text" name="SearchKeyword" id="SearchKeyword" class="indextxt" value="" size="21" maxlength="50">
</p>
</form>
I need the choices to that the user selects to populate the URL and go to the following page:
http://www.website.com/food.php?tab=events&query=VenueFoodFind&site=ESD&tpl=VenueFoodSearch&SearchKeyword=&SearchCategory=&SearchSubCategory=&SubmitEvent=submit
SearchKeyword= VALUE OF ---> <input type="text" name="SearchKeyword" id="SearchKeyword" class="indextxt" value="" size="21" maxlength="50">
SearchCategory = VALUE OF ---> <select name="SearchCategory" style="width: 170px" size="8" class="indextxt">
SearchSubCategory = VALUE OF ----> <select name="SearchSubCategory" style="width: 170px" size="8" class="indextxt">
<form name="FOOD" method="post" action="">
<p>
<select name="SearchCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL CITIES</option>
<option value="Airmont">Airmont</o
<option value="Ardsley">Ardsley</o
<option value="Armonk">Armonk</opt
<option value="Baldwin Place">Baldwin Place</option>
</select>
</p>
<p>
<select name="SearchSubCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL TYPES</option>
<option value="American">American<
<option value="Bakery">Bakery</opt
<option value="Barbecue">Barbecue<
<option value="Brazilian">Brazilia
</select>
</p>
<p>
<input type="text" name="SearchKeyword" id="SearchKeyword" class="indextxt" value="" size="21" maxlength="50">
</p>
</form>
I need the choices to that the user selects to populate the URL and go to the following page:
http://www.website.com/food.php?tab=events&query=VenueFoodFind&site=ESD&tpl=VenueFoodSearch&SearchKeyword=&SearchCategory=&SearchSubCategory=&SubmitEvent=submit
SearchKeyword= VALUE OF ---> <input type="text" name="SearchKeyword" id="SearchKeyword" class="indextxt" value="" size="21" maxlength="50">
SearchCategory = VALUE OF ---> <select name="SearchCategory" style="width: 170px" size="8" class="indextxt">
SearchSubCategory = VALUE OF ----> <select name="SearchSubCategory" style="width: 170px" size="8" class="indextxt">
ASKER
I don't see where the SearchKeyword, SearchCategory, and SearchSubcategory are in that URL
IE: it the user selects a keyword of FOOD, SearchCategory = Airmont, SearchSubcategory=American
The submit button would take you to this URL
http://www.website.com/food.php?tab=events&query=VenueFoodFind&site=ESD&tpl=VenueFoodSearch&SearchKeyword=FOOD&SearchCategory=AIRMONT&SearchSubCategory=AMERICAN&SubmitEvent=submit
IE: it the user selects a keyword of FOOD, SearchCategory = Airmont, SearchSubcategory=American
The submit button would take you to this URL
http://www.website.com/food.php?tab=events&query=VenueFoodFind&site=ESD&tpl=VenueFoodSearch&SearchKeyword=FOOD&SearchCategory=AIRMONT&SearchSubCategory=AMERICAN&SubmitEvent=submit
Sorry, better check this:
<form name="FOOD" method="GET" action="http://www.website.com/food.php">
<input type="hidden" name="tab" value="events" >
<input type="hidden" name="query" value="VenueFoodFind" >
<input type="hidden" name="site" value="ESD" >
<input type="hidden" name="tpl" value="VenueFoodSearch" >
<p>
<select name="SearchCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL CITIES</option>
<option value="Airmont">Airmont</o ption>
<option value="Ardsley">Ardsley</o ption>
<option value="Armonk">Armonk</opt ion>
<option value="Baldwin Place">Baldwin Place</option>
</select>
</p>
<p>
<select name="SearchSubCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL TYPES</option>
<option value="American">American< /option>
<option value="Bakery">Bakery</opt ion>
<option value="Barbecue">Barbecue< /option>
<option value="Brazilian">Brazilia n</option>
</select>
</p>
<p>
<input type="text" name="SearchKeyword" id="SearchKeyword" class="indextxt" value="" size="21" maxlength="50">
</p>
<input type="submit" name="SubmitEvent" value="submit" >
</form>
<form name="FOOD" method="GET" action="http://www.website.com/food.php">
<input type="hidden" name="tab" value="events" >
<input type="hidden" name="query" value="VenueFoodFind" >
<input type="hidden" name="site" value="ESD" >
<input type="hidden" name="tpl" value="VenueFoodSearch" >
<p>
<select name="SearchCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL CITIES</option>
<option value="Airmont">Airmont</o
<option value="Ardsley">Ardsley</o
<option value="Armonk">Armonk</opt
<option value="Baldwin Place">Baldwin Place</option>
</select>
</p>
<p>
<select name="SearchSubCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL TYPES</option>
<option value="American">American<
<option value="Bakery">Bakery</opt
<option value="Barbecue">Barbecue<
<option value="Brazilian">Brazilia
</select>
</p>
<p>
<input type="text" name="SearchKeyword" id="SearchKeyword" class="indextxt" value="" size="21" maxlength="50">
</p>
<input type="submit" name="SubmitEvent" value="submit" >
</form>
Give the last proposal a try and tell me what you get in a browser when you press submit.
ASKER
OK
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<form name="FOOD" method="GET" target="_self" action="http://www.website.com/food.php?tab=events&query=VenueFoodFind&site=ESD&tpl=VenueFoodSearch">
<p>
<select name="SearchCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL CITIES</option>
<option value="Airmont">Airmont</o
<option value="Ardsley">Ardsley</o
<option value="Armonk">Armonk</opt
<option value="Baldwin Place">Baldwin Place</option>
</select>
</p>
<p>
<select name="SearchSubCategory" style="width: 170px" size="8" class="indextxt">
<option value="" selected>ALL TYPES</option>
<option value="American">American<
<option value="Bakery">Bakery</opt
<option value="Barbecue">Barbecue<
<option value="Brazilian">Brazilia
</select>
</p>
<p>
<input type="text" name="SearchKeyword" id="SearchKeyword" class="indextxt" value="" size="21" maxlength="50">
</p>
<input type="submit" name="SubmitEvent" value="submit" >
</form>