User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,364 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,995 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1336 | Replies: 8 | Solved
Reply
Join Date: May 2006
Posts: 57
Reputation: kaushik259106 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kaushik259106 kaushik259106 is offline Offline
Junior Poster in Training

Help Check Iframe compatability

  #1  
Dec 24th, 2007
Is there a way to check Iframe is supported by a browser or not in the JSP using some script. Please let me know! Its urgent
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,863
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Check Iframe compatability

  #2  
Dec 24th, 2007
One way would be to try to create an IFRAME element using Javascript. If that fails, you can be sure that the browser doesn't support IFRAMES. But this requires your user to have javascript enabled.
var e = document.createElement("iframe");
if(!e)
    alert("Your browser doesn't support IFRAMES");
Another way to notify your users would be to place the message between the IFRAME tag. Something like:
<iframe id="iFrm" name="iFrm" src="Source.html">
Your browser doesn' support IFRAMES
</iframe>
But it is pretty much a moot point since all modern browsers support IFRAMES.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: May 2006
Posts: 57
Reputation: kaushik259106 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kaushik259106 kaushik259106 is offline Offline
Junior Poster in Training

Re: Check Iframe compatability

  #3  
Dec 24th, 2007
Ya i dint thought about the first option but thought about the second one before.What i wanted was if the user wont have the Iframe support he may be provided with a web link so that he can click on it.. But in the 2nd situation it seems not to be possible! Any help mate?
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,863
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Check Iframe compatability

  #4  
Dec 24th, 2007
> What i wanted was if the user wont have the Iframe support he may be provided with a web
> link so that he can click on it

So keep the link as a part of the content of the iframe tag.
<iframe src="somesource.html" name="frm" id="frm">
  <a href="somesource.html">
    Click here since your browser doesn't support IFRAMES
  </a>
</iframe>
Last edited by ~s.o.s~ : Dec 24th, 2007 at 9:07 am.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: May 2006
Posts: 57
Reputation: kaushik259106 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kaushik259106 kaushik259106 is offline Offline
Junior Poster in Training

Re: Check Iframe compatability

  #5  
Dec 24th, 2007
bro excelent! Too cool.. just one more help! how do I test that ? Means all browser are capable of IFrame.. which browser should i use to test?
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,863
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Check Iframe compatability

  #6  
Dec 24th, 2007
Try downloading IE2, iCab (a browser), Opera 3 or Netscape 4 since these browsers are known to not support IFrames. Try downloading one of these and testing your page on it. But seriously, this is a dumb test since I am sure everyone must have moved with the times and has stopped using browsers from the stone age.

If you still continue with the test, let me know which browser works for your test.
Last edited by ~s.o.s~ : Dec 24th, 2007 at 9:25 am.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: May 2006
Posts: 57
Reputation: kaushik259106 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kaushik259106 kaushik259106 is offline Offline
Junior Poster in Training

Re: Check Iframe compatability

  #7  
Dec 24th, 2007
Bro.. its true that it will of no use.. but any way...I tested it like this.. send the html file to my nokia n80i as a message through bluetooth.. clicked on it and it opened in the default browser and as it doesnot supports iframe i was able to test it!
See the screen shot!
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,863
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 23
Solved Threads: 344
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Check Iframe compatability

  #8  
Dec 25th, 2007
Glad you could get it to work. :-)
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: May 2006
Posts: 57
Reputation: kaushik259106 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kaushik259106 kaushik259106 is offline Offline
Junior Poster in Training

Re: Check Iframe compatability

  #9  
Dec 25th, 2007
bro another way to test! Just now found.. Go to orkut.com. Login and scrap your friend with IFRAME.. it supports html but no iFRAME!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 3:45 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC