CodeIgniter Forums
need help - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: need help (/thread-9122.html)

need help - El Forum - 06-12-2008

Hi guys

In my view page i had three drop down box.

when the page gets load the default drop down box will populate and onother two drop down box populate with the help of ajax.

when i hit submit button the page get refresh, i can able to restore the value in default drop down box (what user selected the value),

Is there any way to restore the value in another two drop down box ,when the page get refresh the ajax two drop down box go away.

need help - El Forum - 06-12-2008

After a page refresh, you cannot restore what ajax or a javascript function has done on the client side page.
If you some how prevent the page refresh, than your script can do , what ever you wanna perform on the client side.

if your other two drop downs are generated by ajax, ask your script to set the value of the drop down to what is sent by the server.

document.getElementById('drop_down_id').value = 'some_data';