Load Data in Divs on another page based on dropdown form selections
I have a form that has 2 dropdown menu's:
<form id="form1">
<select name="sweets" id="sweets">
<option value="Cake">Cake</option>
<option value="Pie">Pie</option>
</select>
<select name="candy" id="candy">
<option value="Chocolate">Chocolate</option>
<option value="Gum">Gum</option>
</select>
<input type="submit" value="Submit">
</form>
Say that I select option 'Cake' in first dropdown and option 'Gum' in
second dropdown and hit submit, I would like to load 2 divs on the next
page i.e.
<div id="cake">some data</div> and <div id="gum">some data</div>
Since 'Pie' and 'Chocolate' weren't selected, I would not want them to
load any related data on the next page.
Similarly, if I choose 'Cake' and 'Chocolate', the related divs should
open up on the next page.
I'm trying to Load Data on another page based on multiple form selections.
I'm completely zonked and don't have a clue of how to pass data to another
page based on these dropdown selections. I have tried a bit of javascript
as well as php but didn't come close to any solution.
Can someone please help! Or point me out in the right direction. Thank you!
No comments:
Post a Comment