943,741 Members | Top Members by Rank

Ad:
Dec 24th, 2007
0

Check Iframe compatability

Expand Post »
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
Reputation Points: 30
Solved Threads: 0
Junior Poster in Training
kaushik259106 is offline Offline
62 posts
since May 2006
Dec 24th, 2007
0

Re: Check Iframe compatability

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.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. var e = document.createElement("iframe");
  2. if(!e)
  3. 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:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <iframe id="iFrm" name="iFrm" src="Source.html">
  2. Your browser doesn' support IFRAMES
  3. </iframe>
  4.  
But it is pretty much a moot point since all modern browsers support IFRAMES.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Dec 24th, 2007
0

Re: Check Iframe compatability

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?
Reputation Points: 30
Solved Threads: 0
Junior Poster in Training
kaushik259106 is offline Offline
62 posts
since May 2006
Dec 24th, 2007
0

Re: Check Iframe compatability

> 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.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <iframe src="somesource.html" name="frm" id="frm">
  2. <a href="somesource.html">
  3. Click here since your browser doesn't support IFRAMES
  4. </a>
  5. </iframe>
  6.  
Last edited by ~s.o.s~; Dec 24th, 2007 at 10:07 am.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Dec 24th, 2007
0

Re: Check Iframe compatability

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?
Reputation Points: 30
Solved Threads: 0
Junior Poster in Training
kaushik259106 is offline Offline
62 posts
since May 2006
Dec 24th, 2007
0

Re: Check Iframe compatability

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 10:25 am.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Dec 25th, 2007
1

Re: Check Iframe compatability

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!
Reputation Points: 30
Solved Threads: 0
Junior Poster in Training
kaushik259106 is offline Offline
62 posts
since May 2006
Dec 25th, 2007
0

Re: Check Iframe compatability

Glad you could get it to work. :-)
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,871 posts
since Jun 2006
Dec 25th, 2007
0

Re: Check Iframe compatability

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!
Reputation Points: 30
Solved Threads: 0
Junior Poster in Training
kaushik259106 is offline Offline
62 posts
since May 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: drop down menu problem
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Javascript: Multiple Code Blocks





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC