Driving me nuts!!!

admin

Administrator
Staff member
In Internet Explorer, this script works. If you click on the links, it changes the contents of the pulldown. In Netscape 7.01, it also changes the content of the pulldown, but it keeps the old name as selected. For example, if you click on the left llink, the pulldown still shows "blah" in the box UNTIL you click on the pulldown and select "bye". In fact, if you click "hi" it doesn't do anything. Its almost as if the pulldown THINKS "blah" is actually "hi". One you select goodbye, the "blah" disappears and you can only choose "hi" and "bye" from the list, which is the way its supposed to be. The only thing I can think of is that it needs to get 'flushed' somehow. Thoughts?

------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
function change_list(number) {
if(number == '0') {
window.document.first_form.first_select.options[0].text = 'hi';
window.document.first_form.first_select.options[1].text = 'bye';
}
if(number == '1') {
document.first_form.first_select.options[0].text = 'hello';
document.first_form.first_select.options[1].text = 'goodbye';
}

</script>
</head>

<body>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onClick="change_list('0'); return false;";>Click Here</a>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#" onClick="change_list('1'); return false;";>Click Here</a>
<form name="first_form">
<select name="first_select">
<option selected>blah</option>
<option>cooz</option>
</select></form>

</body>
</html>
 
Back
Top