• 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

problem with calling jsp page on evenet onSelect/onClick

 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I have select(combo box) having differnt values..
I want to call a jsp page as soon as he select an option...
I used onSelect,onClick event bt they are not working..
code is

<select name='orderby' onSelect='this.form.submit()'>
<option value='jobsheet' >Jobsheet</jobsheet>
<option value='date'>Date</jobsheet>
<option value='name'>Name</jobsheet>
<option value='model'>Model</jobsheet>
</select>

plz suggest me...
thankx..
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
onselect is not an event handler of that element.

The event handler you want is onchange.

Eric
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chango,
"onSelect" is only valid for inputing in text or textareas.
"onClick" is only valid for buttons, checkboxes and links.

If you are sure the user will only use the mouse to pick an item, you can use "onChange." This will trigger as soon as the user clicks an item.

If you think the user might be using the keyboard, you should use "onBlur." This triggers when the user leaves the field. Here, you will need some javascript to see whether the data changed. You can also write a little JavaScript to merge the two approaches.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic