Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

onselect / onchange ????

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This code works, but if i replace the onchange with onselect, it dosent work, any good ideas ???




Frank
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64692
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not to be flip, but if it works with onchange, why try to change it?

Or are you really asking about the nuances between the two handler types?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onselect is an event, but not an event for a select element.

Read about the event handler here: http://www.devguru.com/Technologies/xhtml/quickref/xhtml_event_onselect.html

Eric
 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok i cant use onselect in a drop down box, but how do i inplement the same functionality in a drop down, i dont want a onchange , but i want a onselect in a drop down ???

Is the only possibility javascript !

Frank
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onblur fires every time

Eric
 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No onblur first take aktion when its loose focus, and that dont happens when i select a new item in my drop down box......

Any other ideas ???

Frank
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
onchange fires when you select an item
onblur fires when you leave the item

those are the two events you have to work with.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic