File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes how to clear multibox selection on browser back Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to clear multibox selection on browser back" Watch "how to clear multibox selection on browser back" New topic
Author

how to clear multibox selection on browser back

sri kota
Greenhorn

Joined: Mar 21, 2008
Posts: 3
Hi,


I have a page where i show up different options to select. I am holding the selection using multibox. On submit of the page, I use these values to show the details of the selection.
I am doing a check on minimum selection onsubmit in javascript.
this check uses a global variable count to check the count of the selection.

When the user hits browser back, the multibox selection is retained but, the count is zero.. so my minimum check never allows me to submit the form.
I want to clear the selection of the multibox when the user hits the browser back to go back to previous page(jsp).

Any suggestion?

Thanks in advance

-
sri
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

sri kota wrote:Hi,


I have a page where i show up different options to select. I am holding the selection using multibox. On submit of the page, I use these values to show the details of the selection.
I am doing a check on minimum selection onsubmit in javascript.
this check uses a global variable count to check the count of the selection.

When the user hits browser back, the multibox selection is retained but, the count is zero.. so my minimum check never allows me to submit the form.
I want to clear the selection of the multibox when the user hits the browser back to go back to previous page(jsp).

Any suggestion?

Thanks in advance

-
sri



Please show your code
Prashant Mak
Greenhorn

Joined: Nov 13, 2009
Posts: 4
You can try something, like

window.setTimeout(yourMethod,1000);
function yourMethod()
{
document.getElementById('combobox').value='0'; //for e.g
}

yourMethod() will be called, after the page loads.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to clear multibox selection on browser back