简体   繁体   中英

Drop down not showing value in IE

The first dropdown "Select device" is not showing any value in IE:

<div class="select-container"> 
<SELECT Id="Device" name="device" onchange="javascript:LoadDevice(this.value);">
</SELECT>

<div class="select-container" id="Model">
<SELECT name="model" ><OPTION>Select Model</OPTION>
</SELECT>

Please check the HTML entire page here: http://goo.gl/1kEc2J

It works in all other browsers.

The dropdown gets its value from an external PHP page.

Any help would be very appreciated.

Your site is wrong on so many levels. But to your problem that you've listed here.

remove all of the "javascript: text from your events as these are not needed.

remove the onclick statements from <option value="1" onclick="javascript:LoadDevice(1);">iPhone</option>

Why are you doing this?

<script src="http://www.mobiltelefoner.dk/tst/slicious.php" type="text/javascript">

when the slicious.php is actually a javascript file?

find this line in slicious.php

devicer +='<option value="'+i+'" onclick="javascript:LoadDevice('+i+');">'+aDevice[i]';

should be

devicer +='<option value="'+i+'" onclick="javascript:LoadDevice('+i+');">'+aDevice[i]+'</option>';

you missed to close option tag

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM