Theres a bug relating to IE 5 perhaps they haven't bothered fixing this
feature in IE7?

 

Try some of the other options here:

 

http://support.microsoft.com/default.aspx?scid=kb;en-us;276228

 

<script>

 

function fill_select1() {

 

            for(var i=0; i < 100; i++) {

                                    select1.options[i] = new Option(i,i);

                        }

}

 

function fill_select2() {

 

                        var sOpts = "<SELECT>";

                        for (var i=0;i<100;i++)

                        {

                                    sOpts += '<OPTION VALUE="' + i + '">' +
i + '</OPTION>\n';

                        }

            

                        select2.outerHTML = sOpts  + "</SELECT>";

}

 

function fill_select3() {

 

            for(var i=0; i < 100; i++) {

                           var oOption = document.createElement("OPTION");

                           oOption.text="Option:  " + i;

                           oOption.value=i;

                           document.all.select3.add(oOption)

                        }

}

 

 

 

</script>

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Coulter
Sent: Tuesday, 8 January 2008 2:13 p.m.
To: [EMAIL PROTECTED]
Subject: [DUG-Offtopic] why doesnt this work??

 

Hi all. Can anyone enlighten me why the following code works in FireFox and
not IE?...please no bad M$ jokes :-)

<HTML>
    <HEAD>
        <TITLE>Test</TITLE>


<script Language="JavaScript">
<!--

function addToCombo(){
 
document.getElementById("selectedme1").innerHTML="<option>12345</option>";
}
-->
</script>
</HEAD>
<BODY >        

    <br><BUTTON onclick="addToCombo();">Update</button>
<br>

    test
        <select id="selectedme1" name="selectme" onclick="addToCombo();">
        </select>
    <P>
</BODY>
</HTML>

 

 

_______________________________________________
NZ Borland Developers Group Offtopic mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/offtopic
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to