Closed Bug 114489 Opened 24 years ago Closed 24 years ago

Javascript page redirect gives properties error

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: steve, Assigned: jst)

Details

Attachments

(1 file)

If a webpage has this page redirect JS function function jumpPage(myForm) { newPage = myForm.options[myForm.selectedIndex].value if (newPage != "") window.location.href = newPage } and a dropdown menu starts off with... <select name="primary" size="1" onChange="jumpPage(this.form.primary)"> <option value="http://www.foo.bar">foobar</option> when I select something from this dropdown menu, the browser should go to that website after selection. Instead, the JS console sez: Error: myForm.options has no properties Moz 0.9.6 and pretty much a lot of Moz builds for a long time had no problems with it before.
Attached file testcase
Worksforme with linux build 2001-12-10-08
reporter, what build are you using? Do you see the problem with the testcase I just attached? What platforms are you seeing this on?
Browser, not engine --> DOM Level 0
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → amar
Resolving as WORKSFORME. I'm using Mozilla trunk binaries 2001-12-06-xx on WinNT, Linux, and Mac9.1. When I load the attached testcase and select 'foobar' in the <SELECT> element, the page successfully redirects to http://www.mozilla.org. No errors appear in the JavaScript Console. sunkcost@pobox.com: Does the testcase accurately capture the scenario you described? If so, could you try it with a recent build and see if it works? In that case, please mark this bug "Verified". If the testcase still doesn't work, please reopen the bug. Of course, if the testcase is not quite what you meant, you can either attach one via the "Create a New Attachment" link above, or provide a URL for us to try.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Egg on my face. Bad coding and worse testing on my part. Sorry. What happened was that there were a series of drop down menus A B C ... Z each calling the JS function and each separated by its own <form></form> tags. B had a missing </form> tag which screwed up the functionality of B, C, and D. A, however, worked correctly. Previous versions of Mozilla accommodated this coding error. The 12/10 MacOSX and Win32 builds didn't. Now, that I've corrected the error, the functionality has been restored on 12/10 MacOSX and Win32 12/11. Blah.
sunkcost@pobox.com: Not to worry, that's good news. Marking Verified WorksForMe based on your report; thanks -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: