crs
05-22-2003, 05:59 AM
It's me again with Mozilla and Opera problems. :(
This code works fine on IE, but I would lke it to work on "non IE" too.
<html>
<head>
<title>Option Test</title>
<script>
function init()
{
myobject=document.createElement("OPTION");
myobject.value="Test Value";
document.myform.elements['ul'].add(myobject);
document.myform.ul.lastChild.innerText="Test Text";
}
</script>
</head>
<body onload="init()">
<form name="myform">
<select name="ul"></SELECT>
</form>
</body>
</html>
Thank you in advance...
This code works fine on IE, but I would lke it to work on "non IE" too.
<html>
<head>
<title>Option Test</title>
<script>
function init()
{
myobject=document.createElement("OPTION");
myobject.value="Test Value";
document.myform.elements['ul'].add(myobject);
document.myform.ul.lastChild.innerText="Test Text";
}
</script>
</head>
<body onload="init()">
<form name="myform">
<select name="ul"></SELECT>
</form>
</body>
</html>
Thank you in advance...