Dropdown in PHP

Posted by VP on Stack Overflow See other posts from Stack Overflow or by VP
Published on 2010-04-09T21:42:46Z Indexed on 2010/04/09 21:53 UTC
Read the original article Hit count: 346

Hi,

I am using PHP 5.2 on SUN OS server. Having problems with the following piece of code that for a drop down:

echo '<form action="" method="get">';
echo '<p>Information:<br />';
echo '<select name="acctno" style="width: 100px;">';
foreach ($this->account_names as $acctno => $acctname) {
   echo '<option value="'.$acctno.'">'.$acctname.'</option>';
   }
echo '</select> <input type="submit" value="view" />';
echo '</form>';

Worked perfectly fine on Firefox and Chrome; however there is a problem with Internet Explorer.

In IE the dropdown width is limited to the size i.e 100px. So only the first 15-16 characters of the account name are displayed all the time. However in chrome or firefox, even if only 15-16 characters are displayed initially, when the drop down arrow is clicked upon, it show the entire name (however long it may be). This does not happen with IE. So if the account name is, lets say, "1223456789abcdefghijkl" then: For IE: shows only "123456789" all the time Ffor chrome or firefox: shows "123456789" and when it is dropped down it show the full name as "123456789abcdefghijkl". Any help here would be much appreciated.

Thanks, VP

© Stack Overflow or respective owner

Related posts about css

Related posts about dropdown