Page 1 of 1

Dropdown menu + refresh

Posted: Thu Aug 05, 2004 3:01 pm
by Joe
I have made a drop down in my form but I have bumped a small problem. I am wishing to show 'shipping costs' for each individual 'state' which is chosen (Australian states) and I thought of the idea where the page is refreshed after a state is chosen in order for the correct shipping costs to be shown. The best example I can give is when you sign up for an account (eg, hotmail) and after choosing an appropiate state the zip/postalcode changes automatically.

Sorry if this is a bad explination but it is the best I can do. :D

Regards


Joe 8)

Posted: Thu Aug 05, 2004 3:37 pm
by feyd
The basics of doing this can be found here: viewtopic.php?t=22055&highlight=onchange+select

there are 2 ways I can think of doing this: either submit the form as a partial, so all the challenge is on the form processor knowing it's partial (you can use hidden fields).. or you could store the shipping costs inside the select's values, and alter the page code via innerHTML/innerText and change the value of a hidden field (maybe)

Posted: Thu Aug 05, 2004 4:44 pm
by Joe
Thanks alot feyd. much appreciated :D