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 onDblClick with Listbox values Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "onDblClick with Listbox values" Watch "onDblClick with Listbox values" New topic
Author

onDblClick with Listbox values

Ricky Jay
Ranch Hand

Joined: Feb 12, 2010
Posts: 62
If I use the below code, and double click in my list box will generate a message with a null value.
#1


if I do it like this(where if the value is double clicked), I don't get any alert message.
#2


Does javascript onDblClick not work on list box values? I would like javascript to do something when the value is clicked in the listbox. Eventually would like to to turn into Ajax and load something on the page. But I'm testing right now with alert messages.

Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 48842

The HTML is malformed.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Ricky Jay
Ranch Hand

Joined: Feb 12, 2010
Posts: 62
Bear Bibeault wrote:The HTML is malformed.


Appreciate the feedback. Could you elborate?
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 48842

What elaboration is needed? Check your HTML. It's wrong.
Ricky Jay
Ranch Hand

Joined: Feb 12, 2010
Posts: 62


Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 48842

Working now? It works fine for me.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 14857
I never read the value directly with a select element because of the olden days when some browsers failed when you did that. The old skool way:



Eric
 
 
subject: onDblClick with Listbox values
 
developer file tools