Closed Bug 3950 Opened 26 years ago Closed 26 years ago

crash from javascript button

Categories

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

x86
Windows 95
defect

Tracking

()

VERIFIED DUPLICATE of bug 3317

People

(Reporter: dbaron, Assigned: joki)

Details

Attachments

(1 file)

The following page causes a crash (as determined by Norton CrashGuard) when I press the "Update" button. I know the code in the first function is nonstandard, but it shouldn't *crash*. Furthermore, it doesn't have any problem when it loads the page originally (and it is running the code then). If I remove the content of the first function, the crash goes away. I don't know whether to file this as "Javascript" or "DOM Level 1". Filing as "Javascript". <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC- html40/strict.dtd"> <HTML> <HEAD> <TITLE>Alternate Stylesheet Selector Demonstration</TITLE> <LINK REL="stylesheet" HREF="http://www.w3.org/StyleSheets/Core/Ultramarine" TITLE="Ultramarine" TYPE="text/css"> <LINK rel="alternate stylesheet" HREF="http://www.w3.org/StyleSheets/Core/Steely" TITLE="Steely" TYPE="text/css"> <LINK rel="alternate stylesheet" HREF="http://www.w3.org/StyleSheets/Core/Oldstyle" TITLE="Oldstyle" TYPE="text/css"> <META http-equiv="Content-Script-Type" content="text/javascript"> <SCRIPT TYPE="text/javascript"> // copyright (c) 1999 L. David Baron // based on original by Chris Wilson function selectStyleSheet( selector ) { var i; var title = selector.options[ selector.selectedIndex ].text; for ( i = 0; i < document.styleSheets.length; i++ ) { if ( document.styleSheets[ i ].title == title ) document.styleSheets[ i ].disabled = false; else if ( document.styleSheets[ i ].title != "" ) document.styleSheets[ i ].disabled = true; } } function UpdateSSList( selector ) { } </SCRIPT> </HEAD> <BODY onLoad="UpdateSSList(document.getElementById('ssSelector'))"> <!-- can document be omitted here? --> <h1>Alternate Stylesheet Selector Demo</h1> <DIV> <FORM METHOD="GET" ACTION="dummy.cgi"> Selected stylesheet: <SELECT ID="ssSelector" onChange="selectStyleSheet(this)"> <OPTION SELECTED>This stylesheet selector requires JavaScript.</OPTION> </SELECT> <INPUT TYPE="button" onClick="UpdateSSList(document.getElementById ('ssSelector'))" value="Update"> <!-- can document be omitted here ? --> </FORM> </DIV> </BODY> </HTML>
looks like a DOM problem, not core JavaScript.
Assignee: norris → vidur
Assignee: vidur → joki
Component: JavaScript → DOM Level 1
Another example of event handling resulting in deletion of frames resulting in a crash while the stack unwinds and accesses one of the deleted frames. Tom, enjoy!
QA Contact: 4015 → 3847
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 3317 ***
Status: RESOLVED → VERIFIED
Agreed. This is a duplicate of 3317.
Attached file original test case, attached (deleted) —
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: