CodeIgniter Forums
need help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: need help (/thread-9122.html)



need help - El Forum - 06-12-2008

[eluser]nandish[/eluser]
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

[eluser]nirbhab[/eluser]
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';