refreshing help script

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Smackie
Forum Contributor
Posts: 302
Joined: Sat Jan 29, 2005 2:33 pm

refreshing help script

Post by Smackie »

I need help i am making a form for a friend thats has a shirt, logo, and other stuff kind of business and he wanted me to make a contact form for him and well i made a dropdown menu for it and i want it where they click on shirts it will refresh and a new dropdown menu will show up here is the script so far (its right after the drop down menu and its php)

Code: Select all

if (isset($_POST['shirt'])
 {
<select name="dropdown" class="dropdown">
<option>-Select One-</option>
<option value="tshirts">Large</option>
<option value="business">X-Large</option>
<option value="cards">XX-Large</option>
<option value="flyers">XXX-Large</option>
</select>
}
can someone help me please

Thank you
Smackie
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

can be achieved in two ways - first is fetch all the records from db, store it in arrays and dynamically change the options when select changes using js, second is to submit the form every time select changes and populate the options using php. Your choice...
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

The second option, btw, is more common used. At least in the websites where I hang around.
Smackie
Forum Contributor
Posts: 302
Joined: Sat Jan 29, 2005 2:33 pm

Post by Smackie »

um im not really following you :-\ i dont use javascript much :?
pilau
Forum Regular
Posts: 594
Joined: Sat Jul 09, 2005 10:22 am
Location: Israel

Post by pilau »

Just submit your form each time the user clicks on an option in the select menu.
Post Reply