Click to See Complete Forum and Search --> : Driving me nuts!!!


wfsaxton
02-16-2003, 09:46 PM
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="#" onClick="change_list('0'); return false;";>Click Here</a>
<a href="#" 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>

khalidali63
02-16-2003, 11:20 PM
You are missing a closing bracket for the function change_list.......


add a } (closing bracket) just above the
</script> tags....
it shoudl do it for you.

Cheers

Khalid

wfsaxton
02-17-2003, 08:53 AM
Yeah, I saw that last night, fixed it, and it still happens. I also put the semi-colon inside of the double quotes for the change_list function call, but that also did nothing.


Could it maybe be a bug in Netscape 7.01?

khalidali63
02-17-2003, 09:08 AM
Nope,because I ( always use NS).
Here use this link

http://68.145.35.86/temp/wfsaxton-DropDown.html

Khalid

wfsaxton
02-17-2003, 02:17 PM
It has to be NS 7.01 bug. I follow that link and it still does the same thing.

Are you using 7.01?

khalidali63
02-17-2003, 02:28 PM
This is what happening when I test the page on the link I provided earlier.

IE6
1.On page load the drop down shows
blah and second value is cooz
2.when clicked on link on the left
it shows hi and the second entry is bye
3.Nothing happens on selecting either hi or bye.
4.When clicked on right link
displays hello and second entry is goodbye.
Nothing happens upon selection of either of the values.

NS6+ ( Mozilla 1.21)
1.On page load the drop down shows
blah and second value is cooz
2.when clicked on link on the left
it shows hi and the second entry is bye
3.Nothing happens on selecting either hi or bye.
4.When clicked on right link
displays hello and second entry is goodbye.
Nothing happens upon selection of either of the values.

Now you tell me what have I missed in it.
:-)
Khalid

wfsaxton
02-17-2003, 02:55 PM
Okay...this is what is happening.

In my version of IE6, everything works fine. In Netscape 7.01, it doesn't. I don't have a copy of 6.XX to try, but if you have a copy of 7.01 and want to check it out, I think you'll reproduce my problem.

I think it is a bug because this is what happens:
1) blah and cooz are in the list. If you open the pulldown menu, you see blah (selected) and cooz.
2) When you click the left link, the pulldown actually SHORTENS in width which, according to my theory, means it thinks it has loaded into the list hi and bye. Yet, blah still shows up. When you open the pulldown menu this time you see blah, hi, and bye BUT hi is shown as selected. This, according to my theory, means that it actually thinks hi is showing, but actually blah is still showing. That is why when you select hi from the pulldown, nothing changes because it thinks its already selected. If you selected bye from the pulldown THEN bye shows up selected. Opening the pulldown THEN shows hi and bye (selected) and NO MORE blah.
I believe this is a bug because Netscape, behind the scenes, is working fine. It thinks, when the link is clicked, that it loaded a pulldown with the options "hi" and "bye". The GUI, however, still shows blah until you selected a different option. Hence, selected the bye option fixes the pulldown but selecting the hi option does not, because Netscape already thinks its selected.

:: pant, pant ::