Re: Quickform Hierselect ICANTBELIEVE Problem

From: Date: Thu, 24 Feb 2005 18:05:54 +0000
Subject: Re: Quickform Hierselect ICANTBELIEVE Problem
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17676@lists.php.net to get a copy of this message
On Thu, 24 Feb 2005 18:03:47 +0100, Patrick Fehr <fehrp@ee.ethz.ch> wrote: > A dynamically built array refuses me to hierselect, it always shows in the > second box the courses of [1](Paartanz) even if group [2] is selected, it > stays at the courses of [1]. > I made it veeeeeery simple to follow: > > CODE BELOW > ---------------->8------------------ > $opts[] = $main; > $opts[] = $secondary; > > $hs =& $this->addElement('hierselect', 'ihsTest', 'Hierarchical > select:', > array('style' => 'width: 20em;'), '<br />'); > $hs->setOptions($opts); > ---------------->8------------------ > > FOLLOWING DOES NOT WORK: > ---------------->8------------------ > //the arrays are called $main and $secondary: > > array(2) { > [1]=> > string(8) "Paartanz" > [2]=> > string(9) "Solokurse" > } > array(2) { > [1]=> > array(13) { > [26]=> > string(12) "Dancing I(3)" > [27]=> > string(12) "Dancing I(4)" > [25]=> > string(10) "Dancing II" > [6]=> > string(18) "Fortgeschritten IX" > [5]=> > string(18) "Fortgeschrittene I" > [24]=> > string(21) "Salsa Club "Espresso"" > [13]=> > string(8) "Salsa II" > [14]=> > string(11) "Salsa II(2)" > [28]=> > string(11) "Salsa II(3)" > [29]=> > string(11) "Salsa II(4)" > [9]=> > string(9) "Salsa III" > [10]=> > string(13) "Salsa Rueda I" > [11]=> > string(13) "Salsa Rueda I" > } > [2]=> > array(7) { > [21]=> > string(11) "Bodyforming" > [22]=> > string(11) "Bodyforming" > [31]=> > string(11) "Bodyforming" > [18]=> > string(18) "HipHop ab 10 Jahre" > [17]=> > string(18) "HipHop ab 12 Jahre" > [16]=> > string(18) "HipHop ab 13 Jahre" > [30]=> > string(18) "HipHop ab 15 Jahre" > } > > FOLLOWING DOES WORK: > ---------------->8------------------ > $main[4] = "Pop"; > $main[1] = "Rock"; > $main[3] = "Classical"; > > $secondary[4][69] = "Belle & Sebastian"; > $secondary[4][1] = "Elliot Smith"; > $secondary[4][2] = "Beck"; > $secondary[1][3] = "Noir Desir"; > $secondary[1][53] = "eehe h"; > $secondary[1][54] = "eewwhe h"; > $secondary[1][55] = "eehe hff"; > $secondary[1][4] = "Violent Femmes"; > $secondary[3][6] = "Wagner"; > $secondary[3][6] = "Mozart"; > $secondary[3][7] = "Beethoven"; Have you tried checking for javascript errors? Are there perhaps international characters in those? I don't see any in the e-mail, but it could have been lost. It could be possible that your browser is choking on international characters. Which browser are you using? Have you tried any others? -- Justin Patrin

« previous php.pear.general (#17676) next »