• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • Last Modified:

Controlling browser version?

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
susakli
Asked:
susakli
  • 3
  • 2
1 Solution
 
hexagon47Commented:
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
 
COBOLdinosaurCommented:
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
 
COBOLdinosaurCommented:
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
 
hexagon47Commented:
nothing to add on my behalf, just hope to get a grade for my answer :)
0
 
COBOLdinosaurCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now