Welcome to WebmasterWorld Guest from 54.147.20.131

Forum Moderators: open

Message Too Old, No Replies

opera7 about:blank frame/iframe accessing

deined :(

     

Xuefer

2:05 am on Apr 20, 2003 (gmt 0)

10+ Year Member



<frameset noresize rows="*" onload="alert(self.test); alert(self.test.document)">
<frame src="about:blank" name="test">
</frameset>
=======
Event thread: onload
Error:
name: ReferenceError
message: Security error: attempted to read protected variable

is it a bug in opera7? (not tested on opera6)
it works under both in ie and mozilla!

the only way i can do is:
onload="test.location.href = '/blank.html'; alert(self.test); alert(self.test.document)"

(example changed)

[edited by: Xuefer at 3:04 am (utc) on April 20, 2003]

ShawnR

2:35 am on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your post is a bit cryptic, so I'm not sure, but on the face of it, it looks to me like errors in your html, rather than a bug in opera. What are you trying to do with the src="about:blank" attrib? What do you mean by "deined:"?

Shawn

Xuefer

3:12 am on Apr 20, 2003 (gmt 0)

10+ Year Member



sorry for untested example
iframe may not have the problem(not deadly tested)

the above example expect the error

and another problem:
the first alert gives me "object inaccessable"

i have to setTimeout('alert(self.test)......', 1);
to get self.test object

ShawnR

3:31 am on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi

Still not sure what you want to do by saying 'src="about:blank" '. Do you have an html file called blank.html? If yes, then use 'src="blank.html" '. If not, and you are trying to dynamically create the pop-up, just remove the 'src="about:blank" '. The bug isn't with Opera; Opera is just less forgiving of errors.

The need for a timeout seems strange... Onload() should only fire once the frameset has completed loading all documents in its frames. It seems it is firing prematurely.

Shawn

Xuefer

5:49 am on Apr 20, 2003 (gmt 0)

10+ Year Member



so u meant src="about:blank" should be removed to work on all browsers?

and is it still a validate html?

ShawnR

8:37 am on Apr 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As far as I know, src="about:blank" is illegal on any and all browsers! Perhaps it validates (haven't tried), but its not valid! Leaving out the src attribute is perfectly valid html, and nothing will be loaded in the frame.

Shawn

Xuefer

11:12 am on Apr 20, 2003 (gmt 0)

10+ Year Member



thx
but still error
have to use "/blank.html"
 

Featured Threads

Hot Threads This Week

Hot Threads This Month