homepage Welcome to WebmasterWorld Guest from 54.197.94.241
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Javascript to detect frames support
Yamaha_R1




msg:1482442
 9:25 pm on May 7, 2003 (gmt 0)

How can I use javascript to detect frames? I want to run a small line of javascript, but only IF the browser supports FRAMES.

Any ideas?

Yamaha

[edited by: tedster at 9:29 pm (utc) on May 7, 2003]
[edit reason] change java to javascript [/edit]

 

drbrain




msg:1482443
 9:43 pm on May 7, 2003 (gmt 0)

document.frames

But I don't know if it is defined if the document has no frames.

Yamaha_R1




msg:1482444
 10:50 pm on May 7, 2003 (gmt 0)

Eureka!

I added:

if (top == self && document.frames) self.location.href =

And now it will only re-direct if the browser has frames.

Thanks!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved