[ 3 posts ]

Daniel Dekel

  • Username: dekelraviv
  • Joined: Wed Sep 08, 2010 7:02 am
  • Posts: 9
  • Location: London, UK
  • Offline
  • Profile

Exception when getting value of Select

Post Posted: Fri Sep 23, 2011 5:30 am
+0-
Hello,

I have a situation when retrieving the value of a Select element and has a size bigger than 1.

I found the error in the file "dom-base.js" in line 202 (version 3.4.0)
Code:
val = Y_DOM.getValue(options[node.selectedIndex]);

The problem is that the node.selectedIndex returns -1 because nothng is selected and an exception is produced.

Is anyone aware of this problem?

Luke Smith

YUI Contributor

  • Username: lsmith
  • Joined: Thu Aug 28, 2008 7:50 am
  • Posts: 511
  • Location: Sunnyvale
  • Twitter: ls_n
  • GitHub: lsmith
  • Gists: lsmith
  • IRC: ls_n
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Exception when getting value of Select

Post Posted: Fri Sep 23, 2011 9:46 am
+0-
I've filed this bug for you. You can add yourself to the CC list.

Thanks for spotting this!

Daniel Dekel

  • Username: dekelraviv
  • Joined: Wed Sep 08, 2010 7:02 am
  • Posts: 9
  • Location: London, UK
  • Offline
  • Profile

Re: Exception when getting value of Select

Post Posted: Mon Sep 26, 2011 12:25 am
+0-
Thanks!
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum