• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to clear multibox selection on browser back

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 121
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic