Click to See Complete Forum and Search --> : Clear A Form When 'Back' Buton Is Hit


admgolfer
08-20-2003, 09:06 PM
I have a quick jump dropdown menu that automatically goes to a page when you drop down and select something. If the user hits the back button, their selection is still selected. Is there a way to refresh the dropdown menu so that the original selection shows when you hit the back button?

Further Explination: Right now, my dropdown menu says Quick Jump as it's default selection... If I select Contact Us, and then hit the back button, Contact Us still appears in the dropdown menu... I want Quick Jump to appear in the dropdown menu when the back button is hit - is this possible?

I have tried entering 'SELECTED' in the option tag, and it works only for when I come in from another page, not when I go back via the back button.

Thanks for your help! :)

pyro
08-20-2003, 09:49 PM
Try adding something like this to your page:

<script type="text/javascript">
function setBack() {
document.your_form_name.your_select_name.options.selectedIndex = 0;
}
window.onload = setBack;
</script>And don't forget to change the items in bold...

Khalid Ali
08-20-2003, 09:50 PM
you can try few things
like meta tag no caching and
window.location.reload(true),but this is totally dependant on how your browser caches webpage data

admgolfer
08-20-2003, 09:57 PM
Thank you Pyro... You rule... it worked perfectly.


Thanks Again,
~ADM

pyro
08-20-2003, 10:01 PM
You are very welcome... I was happy to help. :)