Closed
Bug 63267
Opened 25 years ago
Closed 25 years ago
Javascript wasn't invoked
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: wcheng, Assigned: jst)
References
Details
Attachments
(9 files)
Multiple Frameset page, in Frame B, Javascript write content(actually a
complete page) in Frame A's document, inside the content is Javascript function
which should be invoked by the onLoad event, but this is not invoked in
Netscpae 6.
I want to know whether this should happen or not. BTW, the script would be
invoked in IE5 and other browsers. Thanks.
Reporter,
Can you please be more specific and provide us a working example, or at least an
URI where we can find that. Now we can't help you!
Please consider to read the bug writers guidelines on Bugzilla. There you will
find perfect examples on how to file a bug. The current status of this bug,
might even considered to be invalid! And that's not what you want, do you?
Most friendly, HJ.
Comment 2•25 years ago
|
||
You might be using proprietary document objects. See:
http://sites.netscape.net/ekrockhome/standards.html
The question is that when I wrote some content(a page) to Frame B from Frame
A, the content written contains a Javascript function that was expected to
be invoked by the onLoad event of the page, but it wasn't invoked in
Netscape 6, should this happen?
Comment 9•25 years ago
|
||
Browser, not engine ---> DOM Level 0.
Wei Cheng, what build id of Mozilla are you using?
Does your HTML work in NN4.7 without any JavaScript errors?
(type javascript: in the URL bar and hit enter to see this).
The attachments aren't working on the Bugzilla server. One has to
save them locally, and of course one has to use the right filenames
for the child files. To help anyone who tries this, here is what did:
Attach id above Local filename
20987 (whatever you want)
20988 rightframe.htm
20990 midpane.htm
20991 step2.htm
20992 step1.htm
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
QA Contact: pschwartau → desale
Comment 10•25 years ago
|
||
Using Mozilla build id 2000120908 on WinNT. What I find after saving
the files locally is this:
IE4.7 I click button in right middle frame; get a "I am running" msgbox
NN4.7 Here I do NOT get the "I am running" msgbox
Mozilla Here I do NOT get the "I am running" msgbox
Thus, the behavior of NN4.7 and Mozilla seem to be identical on the HTML.
Reporter | ||
Comment 11•25 years ago
|
||
What you testing team got is the same as me.
The Netscape6 I am using is Mozilla/5.0(Gecko20001108); I also used the
Communicator 4.76. Basically the result is same but different from IE's
behavior, I would like to know whether this difference would be kept or will
change in the future. THX
Reporter | ||
Comment 12•25 years ago
|
||
Reporter | ||
Comment 13•25 years ago
|
||
After I updated the "step2.htm" into following Netscape 4.7 is OK, but Netscape
6 still no good.
Code changed, "<Script>" block was moved inside "<head>" block:
<html>
<head>
<title>Test It</title>
<script language="javascript">
function runscript()
{
alert("I am running");
}
</script>
</head>
<body onLoad="runscript();">
hELLO wORLd
</body>
</html>
Reporter | ||
Comment 14•25 years ago
|
||
Sorry, I must messed up somewhere, the Netscape 4.7 and Netscape 6 still behave
the same way as before after the update of the "step2.htm" file
Comment 15•25 years ago
|
||
Wie, do you need help?
Comment 16•25 years ago
|
||
Got that one wrong, sorry Wie must be Wei, but let me check! Yep Sorry!
Comment 18•25 years ago
|
||
Comment 19•25 years ago
|
||
To make this visual I changed the script in step2.html into this:
<script language="JavaScript" type="text/javascript">
function loadHandler() {
if (parent.rframe2 != null ) {
parent.rframe2.document.open("text/html","replace");
alert(document.frm.taContent.value);
parent.rframe2.document.write( document.frm.taContent.value );
parent.rframe2.document.close();
}
return;
}
</script>
Comment 20•25 years ago
|
||
CC:ing
Reporter | ||
Comment 21•25 years ago
|
||
Reporter | ||
Comment 22•25 years ago
|
||
Hi:
I updated the step2.htm as suggested the alert shown is different from 63104,
there is no "</</script>".
thanks
Comment 23•25 years ago
|
||
I'm lost at this point - is this bug still valid? Was the problem
caused by a mistake in the HTML? If so, we should close this bug as invalid -
Reporter | ||
Comment 24•25 years ago
|
||
I think there is still a problem-at least for me. The thing is that, while the
script was supposed to be grabbed properly(as shown in the alert message), but
the script somehow wasn't written to the target frame properly AND wasn't
triggered. if possible please try the updated file on your side and see the
different behaviors between IE and Netscape.
I think you had fixed 63104 BUT 63267 is kind of different bug. THX
Comment 25•25 years ago
|
||
To summarize: the attachments don't run on the Bugzilla server, so save them
locally. Only save the following attachments, and use the following filenames:
Attach id above Local filename
20987 (whatever you want)
20988 rightframe.htm
20990 midpane.htm
20992 step1.htm
21056 step2.htm
Once this is done, when you open the top-level HTML file (attachment 20987 [details]),
the behavior differs between IE and NN4.7; also between IE and Mozilla/N6.
The question is: should it be like that?
Comment 26•25 years ago
|
||
Wei, 63104 is fixed. But for people using an older build of Mozilla, this
example doesn't work! Because of the bug 63014. They have to download a later
version, where this bug doesn't pops up!
Phil, ask yourself, why is this example working in IE?
And why are the problems not the same for Netscape 6 and later Mozilla builds?
Might this be some sort of an Regression??
Please don't close, yet
Reporter | ||
Comment 27•25 years ago
|
||
A funny scenario here is that(reproduced on a machine of my colleague).
Using Netscape 4.76, the "I am running" alert WAS triggered ONLY the first time
the test page was loaded, but after that, the onLoad event wasn't trigger no
more.
If possible try the pages out on a different machine running Netscape 4.76,
could be very interesting-and the "<script ***>blah,blah</script>" block
doesn't seem to be copied over.
Thanks
Comment 28•25 years ago
|
||
Wei, on the first place, I have this seen working too! BUT as we now both must
realize this shouldn't work at all. That last comment of Phil made woke me up,
thanks Phil, I took a dive into the W3C specs. And Oh my lord what was I
thinking? Please take a look at this URI:
http://www.w3.org/TR/html4/interact/forms.html#h-17.7
And as you will see there, the onLoad event isn't supported at all! And don't
forget, that build of Netscape 6 isn't the same as later Mozilla builds! So for
problems, it's better to use the latest version of Mozilla. And the fact that
Microsoft is supporting this event here, that's nice, but I guess this will
never work in current Netscape or Mozilla builds, nor in future versions. At
least, until the current W3C specs are changed first. Please change the summary
field to something like this:
onLoad event doesn't get fired inside element <textarea>
Then close this bug as invalid, I'm sorry but that's the way it is. And if you
don't, someone else will do that for you. It was my pleasure to help you with
this reported bug. And if you don't agree, please file a separate bug, this one
is getting unreadable.
Final note for Phil, thanks for waking me up!
Most friendly, HJ.
![]() |
||
Comment 29•25 years ago
|
||
I'm sorry, but that last comment seems to be on the wrong track... The textarea
is just being used to store some HTML that is then read from there and written
to a different frame right?
And the onload event is on a <body> tag where it is most certainly supported.
In any case, this bug is a duplicate of bug 57636 ("Onload event fails in simple
JavaScript document."). The problem is that onload events are not fired for
documents created with document.write.
*** This bug has been marked as a duplicate of 57636 ***
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 30•25 years ago
|
||
Hm, I like this.
Boris, sorry, but you are missing the point here!
Try to validate this example and you will see, won't get that done!
Simple because it's illegal HTML markup.
In order to get this working, we first need to change the W3C specs.
And that's, is out of the question!
Example
-------
<form action="" name="frm" id="frm">
<textarea cols="5" rows="5" name="taContent">
<html>
<head>
<title>Inside textarea</title>
</head>
<body>
Hello world
</body>
</html>
</textarea>
</form>
Most friendly, HJ.
Comment 31•25 years ago
|
||
Comment 32•25 years ago
|
||
Wei,
I want to make a statement here. I received an e-mail of Boris. In this e-mail
Boris wrote me that you might think I was rude in my statement about closing
this bug. But you know I don't want to do that at all. We worked on this one
together as a team. But I'm only thinking that conform W3C guidelines this never
works. As it is now, because it's invalid HTML markup.
If you feel that I'm wrong, just tell me.
And I have a tip:
Make a string of that code with "blabalabala" inside that <textarea> and use the
string in the javascript function. This seems to be valid for W3C validators.
And as you see, I take your bug report very serious. Wei, belief me, I never
want to be rude, simply because that's not me. Even the fact that I'm not part
of Mozilla or Netscape, I'm just trying to help people out! By trying to walk,
you might fall, as I did in the eyes of Boris.
Most Friendly, HJ.
It's a free country, free spirit, open your mind and a take this free ride.
Reporter | ||
Comment 33•25 years ago
|
||
No worry, HJ, I am one as open as you and I made similar "mistakes" before as
you might knew I am working in Canada where people are extremely polite and
trying very hard to be "politically correct". Please remove this comment from
here after you read it:), I once told one of my colleague "shut up" in a
meeting.....
Comment 34•25 years ago
|
||
Boris pointed me into this direction, thanks Boris. But hey I'm only human. And
Wei. with <blablabla> I mend you code right! Did this do the trick? But you
know, onload doesn't work, try the use of onFocus.
Comment 35•25 years ago
|
||
sorry, 'mend you' should read 'mean your'
You need to log in
before you can comment on or make changes to this bug.
Description
•