?
Solved

Controlling browser version?

Posted on 2003-02-21
5
Medium Priority
?
171 Views
Last Modified: 2010-04-09
My site uses inline frame after users log in. So I have to control if the browser is able to view inline frames.

Which versions of the IE and Netscape are able to view the inline frames, and how is the control code can be?
0
Comment
Question by:susakli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 3

Accepted Solution

by:
hexagon47 earned 80 total points
ID: 7993796
netscape 6.0B1 and opera 4.0 upwards support iframe

and this is the function that I use as a browser sniffer

function initBrowser()
{
dom = (document.getElementById)? true:false;
ie4 = (document.all && !dom)? true:false;
ie5 = (dom && (navigator.appVersion.indexOf("MSIE 5")>-1 || navigator.appVersion.indexOf("MSIE 6")>-1))? true:false;
ns4 = (document.layers)? true:false;
ns6 = (document.createRange)? true:false;
opera = (navigator.userAgent.indexOf("Opera")>-1)? true:false;
}

here is a sample for your code

function checkiframe()
{
if(ns6)
...your code...
}

hope it helps
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8027105
Yeah that one will pretty much handle it. To test for NS 6+ I notmally just test the dom:

if (document.getElementById && !document.all) /* that makes it Netscrap 6+ */

Cd&
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8820388
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 3

Expert Comment

by:hexagon47
ID: 8833076
nothing to add on my behalf, just hope to get a grade for my answer :)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 8963748
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
points to hexagon47 -- grade A

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&

0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question