Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.2.16

Bug #7400 When setting the default on one part of a hierselect the JS fails
Submitted: 2006-04-15 03:01 UTC
From: justinpatrin Assigned:
Status: Duplicate Package: HTML_QuickForm (version CVS)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 - 4 = ?

 
 [2006-04-15 03:01 UTC] justinpatrin (Justin Patrin)
Description: ------------ If I set the default for only one option in a hierselect (or any # less than the max) the JavaScript fails and none but the first select work. See: http://pear.reversefold.com/hierselect.php This is caused by naive code in setValue() in the hierselect element which sets the # of elements based on the # of options in setValue(). I'm *really* not sure why this is as setValue() has nothing to do with setting the options. The fix is to remove the line reading: $this->_nbElements = count($value); from setValue().

Comments

 [2006-05-29 16:12 UTC] avb (Alexey Borzov)
Looks like a duplicate of bug #6766