Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Detect Browser - switch to iframe or url as page loads

Reply
Thread Tools

Detect Browser - switch to iframe or url as page loads

 
 
dj
Guest
Posts: n/a
 
      04-29-2004
Hi,

Anyone have a snippet of code that will guide me as follows;

I want to use an iframe but if the browser does not support iframes I
want to simply replace the iframe HTML code with the URL which will be
in the iframe.

I'll probably detect the browser to make the switch.

I'm a beginner in javascript so any help is appreciated.

regards
DJ
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      04-29-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (dj) writes:

> I want to use an iframe but if the browser does not support iframes I
> want to simply replace the iframe HTML code with the URL which will be
> in the iframe.


No scripting necessary, HTML can do that:

<iframe src="something.html"><a href="something.html">Something</a></iframe>

If a browsers doesn't know the iframe tag, it must ignore it. That
makes the anchor tag visible. If it knows the iframe tag, it knows to
ignore the content too.

/L
--
Lasse Reichstein Nielsen - (E-Mail Removed)
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display "Please Wait" message in IFRAME while remote page loads? John Kotuby ASP .Net 5 06-24-2008 05:07 PM
Help - browser loads another page after home page Cindy Stuart Computer Support 4 04-29-2007 03:29 AM
Dragable iFRAME LOADS URL INTO IT yoko Javascript 1 03-03-2007 06:07 AM
Get form values from iframe (1) to iframe (2) inside a layer in iframe (1) Daedalous Javascript 3 01-16-2004 11:08 AM
Detect which IFrame is trying to change the top level document href/URL? Robert Oschler Javascript 4 08-26-2003 04:20 PM



Advertisments