CodeIgniter Forums

Full Version: need help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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.

El Forum

[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';