Closed
Bug 3950
Opened 26 years ago
Closed 26 years ago
crash from javascript button
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: dbaron, Assigned: joki)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
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>
Updated•26 years ago
|
Assignee: norris → vidur
Updated•26 years ago
|
Assignee: vidur → joki
Component: JavaScript → DOM Level 1
Comment 2•26 years ago
|
||
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!
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
Agreed. This is a duplicate of 3317.
Reporter | ||
Comment 5•25 years ago
|
||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•