| | |
Check Iframe compatability
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: May 2006
Posts: 60
Reputation:
Solved Threads: 0
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
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.
Another way to notify your users would be to place the message between the IFRAME tag. Something like:
But it is pretty much a moot point since all modern browsers support IFRAMES.
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
var e = document.createElement("iframe"); if(!e) alert("Your browser doesn't support IFRAMES");
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<iframe id="iFrm" name="iFrm" src="Source.html"> Your browser doesn' support IFRAMES </iframe>
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
•
•
Join Date: May 2006
Posts: 60
Reputation:
Solved Threads: 0
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?
> 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.
> 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)
<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 10:07 am.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
•
•
Join Date: May 2006
Posts: 60
Reputation:
Solved Threads: 0
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?
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.
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.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
•
•
Join Date: May 2006
Posts: 60
Reputation:
Solved Threads: 0
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!
See the screen shot!
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: drop down menu problem
- Next Thread: Javascript: Multiple Code Blocks
Views: 2312 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxexample ajaxjspservlets array autoplay blackjack browser captcha captchaformproblem cart child close codes date debugger decimal dependent developer disablefirebug dom element embed engine enter events ext file firefox flash focus form forms frameworks game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index java javascript javascripthelp2020 javascripts jquery jsp jump libcurl listbox maps marquee masterpage math media menu mp4 onerror onmouseoutdivproblem onmouseover onreadystatechange paypal pdf php player position post programming prototype rated redirect safari scale scriptlets scroll search security size software solutions sources star starrating stretch synchronous toggle tweet unicode variables web webkit webservice window \n






