Re: [SMARTY-DEV] Problem with html_options in IE5.2 on MacOSX

From: Date: Wed, 11 Dec 2002 19:13:08 +0000
Subject: Re: [SMARTY-DEV] Problem with html_options in IE5.2 on MacOSX
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-408@lists.php.net to get a copy of this message
That is wrong, and the CVS version of html_options has this fixed. On Wed, 2002-12-11 at 12:44, Patrik Bengtsson wrote: > Hi! > > I'm using Smarty 2.3.1 and I'm having some problems with the output of html_options > see the following example; > > > -- In Template-file -- > > <select name="areacode"> > {html_options options=$Areacode selected=$areacode} > </select> > > > -- In PHP-code -- > > $Areacode = array('None' => 'Alla', '011' => > 'City1', '0120' => 'City2'); > > > I get the following output; > > <select name="areacode" class="text2"> > <option label="None" value="None">Alla</option> > <option label="011" value="011">City1</option> > <option label="0120" value="0120">City2</option> > </select> > > I belive the output to be wrong shouldn't the 'label' have the text instead of > the key? The dropdown-menu looks good in Mozilla and Windows IE but in IE 5.2 on MacOSX the dropdown > shows the key-value taken from 'label' (Bug in IE on Mac?). > > I have changed the following in 'plugins/function.html_options.php' line 46 from; > $html_result = "<option label=\"$key\" > value=\"$key\""; > > to; > $html_result = "<option label=\"$value\" value=\"$key\""; > > Now the result is good in all my browsers.. > > Is this a bug or have I missed something? > > Regards, > > /Patrik Bengtsson > Instar Utveckling -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#408) next »