faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

19 of 32 people (59%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

Why makes the following code from a frame crash Netscape : "if (self.parent.frames.length != 0) { self.parent.location.href=document.location.href;}"?

Jan 9th, 2002 08:08
David Blackledge, christine francillon,


Though it may not be the final answer, there is one important flaw in 
the code:
document.location is deprecated and should never be used.
Instead, either use
document.URL
or
window.location.href
Considering the somewhat complex situation, this deprecated property may 
confuse Netscape enough to cause a crash.
David.
http://David.Blackledge.com