Forum Post: Using js (jquery) to select only the 1st item in a select component

  • Thread starter Thread starter riche
  • Start date Start date
Status
Not open for further replies.
R

riche

Guest
I have a filter page and would like to reset the values back to default whenever they enter or leave (don't care which one) the page. The first item in the select is "Choose..." with a value of "". I added another property to make it allow multiple. So, if they choose multiple options and filter or cancel, I want it to move the selection back to only Choose... (or empty value). I've created the page hide or page show event and tried many different ways, all of which have failed. I have tried casting Progress('selectName').val(0); and Progress('selectName').val(""); and many variants of jquery, like $("select[name='testSelect']:selected").first().attr("selected", false); and others. If I have mutliple on, do I need to use the checked property instead? Do I need to call a refresh somehow (looked and didn't see one)?

Continue reading...
 
Status
Not open for further replies.
Back
Top