Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
JS question
Name: lmc Date: October 12, 2003 at 04:23:44 Pacific OS: Windows XP CPU/Ram: 550/256
Comment:
hello everyone,
i am a beginner in javascript, and have a question regarding some code. do you know what this short block of code does:
if (top.location != self.location) { top.location = self.location; }
Name: Don Arnett Date: October 12, 2003 at 05:57:37 Pacific
Reply:
I believe that it is a check to make sure that the page is not being displayed inside a frame.
The page that is doing the checking (self) is comparing it's URL (self.location) to the URL of the outer most frame (top.location). If the two are not the same, then the page is inside a frame, so it sets the top.location to it's address, thus removing itself from the frame.
Summary: I had a javascript section at the end of my file, after the close of the body tag, which fills the innerHTML of one of my tags with a table. The code was working perfectly fine. But then I wanted to m...
Summary: Thanks for the answers on my other basic question. Is there a basc compiler out there? What I mean is other than VB and interpreters for basic, is there a compiler for the basic language that can prod...
Summary: hey guy, been a while since ive been on ( what with school and all ). but 1 good thing is my AP comp sci is giving me time to program once again! and giving me easy credits :-D. alright onto the point...