Jump to content

dropdown list based on 1st dropdownlist selection without javascript


andibakker

Recommended Posts

I one dropdownlist which causes a reload of the page, passing the value selected in a querystring so that the 2nd dropdownlist populates.  This works well, but I am having trouble preserving form data when the javascript calls a reload of the page. 

Is there a way to have 1 dropdownlist that populates a 2nd dropdownlist without using javascript ?

If so could you please show me a tutorial.  I have seen loads of tutorials, but they all use javascript.

 

Thanks

Well you have to use javascript to put the value of the input into the url its reloading...

 

like..

 

window.location = 'your_page.php?field=' + value_of_field;

 

then you can use php to grab that value and use it to have the automatically automatically set the value

ok, so javascript is the only way.  Now, how do I retain the user entered data from the form.  I can do it using querystrings when the javascript reloads, but there is a limit to the amount of data I pass using a query string.  Is there another way to retain this data ? 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.