javascript code fails to obtain seletedItem from a <SELECT>

RESOLVED INCOMPLETE

Status

()

--
major
RESOLVED INCOMPLETE
8 years ago
7 years ago

People

(Reporter: dawinter, Unassigned)

Tracking

3.6 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 GTB7.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 GTB7.1

I have the following <SELECT> in a FORM:

					<form method="POST" name="nevsorlistaform">
                    <label>Keres&eacute;s N&eacute;v Szerint: 
                    <select name="nevsorlista" size="1" id="nl" tabindex="4" onChange="populateFields()">
                      <option value="01">Ada-Winter D&aacute;vid</option>
                      <option value="02">Balkowitz Gabriella</option>
                      <option value="03">Balla Leila</option>
                      <option value="04">Bog&aacute;r Edit</option>
                      <option value="05">Busa Katali</option>
                      <option value="06">Czafik Katalin</option>
                      <option value="07">Cs&eacute;p&aacute;n Lilla</option>
                      <option value="08">Csorba S&aacute;ndor</option>
                      <option value="09">Dar&oacute;czi Mikl&oacute;s</option>
                      <option value="10">Dob&oacute; Magdolna</option>
                      <option value="11">Feszl Erika</option>
                      <option value="12">Fleck Zs&oacute;fia</option>
                      <option value="13">Hajnal M&aacute;rta</option>
                      <option value="14">H&aacute;ry Ildik&oacute;</option>
                      <option value="15">Hord&oacute;s M&aacute;rta</option>
                      <option value="16">Hov&aacute;th Emese</option>
                      <option value="17">L&eacute;n&aacute;rd Judit</option>
                      <option value="18">Kem&eacute;ny Andrea</option>
                      <option value="19">Kisling Judit</option>
                      <option value="20">Kov&aacute;csik Rudolf</option>
                      <option value="21">Liszt Beatrix</option>
                      <option value="22">M&eacute;sz&aacute;ros Enik&#337;</option>
                      <option value="23">Monostory &Aacute;d&aacute;m</option>
                      <option value="24">Mors&aacute;nyi Kl&aacute;ra</option>
                      <option value="25">N&oacute;tin Ad&eacute;l</option>
                      <option value="26">Osztie Ad&eacute;l</option>
                      <option value="27">Palkovics Mikl&oacute;s</option>
                      <option value="28">P&aacute;lv&ouml;lgyi Judit</option>
                      <option value="29">Pere Gy&ouml;ngyi</option>
                      <option value="30">Pethe&#337; Katalin</option>
                      <option value="31">Pesti Magdolna</option>
                      <option value="32">Rics&oacute;y M&aacute;rta</option>
                      <option value="33">Rem&eacute;nyi &Eacute;va</option>
                      <option value="34">Tam&aacute;s D&aacute;niel</option>
                      <option value="35">Vass &Eacute;va</option>
                      <option value="36">V&aacute;rnai G&aacute;bor</option>
                      <option value="37">Vincze Veronika</option>
                    </select>
                    </label>
					</form>

The following javascript code FAILs to select the seletedItem in the <SELECT>:

function populateFields()
{
	myVar = nevsorlistaform.nevsorlista.selectedIndex;
	ImageNum = myVar;
	ShowImage();
	myVar2 = nevsorlistaform.getElementById("n1").selectedIndex;
	alert(myVar2);
}

Reproducible: Always

Steps to Reproduce:
1. Run the WEB page
2. Try to select a Name from the <SELECT> and see if the onChange javascript event works.
3. See that the event doesn't work.
Actual Results:  
Bad. The javascript function myVar = nevsorlistaform.nevsorlista.selectedIndex; works in ANY OTHER browser except Firefox. I tried it with IE, Safari, Opera and Google and they ALL work EXCEPT Firefox.

Expected Results:  
Is there a workaround for this problem ??? It is happening to the latest 3.6 version of Firefox as well, so 

This is the first time that I see that something doesn't work wit Firefox ONLY. This is usually a Microsoft thing. But hey, there is a first time for everything.

Comment 1

8 years ago
Can you attach a testcase that reproduces the problem here? Did you check the Error Console to see if there are any errors reported?

Updated

8 years ago
Version: unspecified → 3.6 Branch

Comment 2

7 years ago
Reporter -> Are you still experiencing this issue with the latest version of Firefox 5? Does the issue occur with the latest nightly? http://nightly.mozilla.org/

Please answer the questions in comment 1

Updated

7 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.