detect frame use 
Author Message
 detect frame use

I am writing an ASP application which need to be display in a frame are
in the calling host page.  In order to display my page, I need to
detect if the host page uses frame.  If frame is not used in the host
page, I just popup a browser window and display alert page telling the
ueser frame is required for the application.  Does anyone know how to
use VBScript to detect the host page structure or settings?  Is there
something in the Active Server Pages Object Model I can query to find
this out? Thanks.

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 08 Mar 2003 03:00:00 GMT  
 detect frame use


Quote:
> I am writing an ASP application which need to be display in a frame are
> in the calling host page.  In order to display my page, I need to
> detect if the host page uses frame.  If frame is not used in the host
> page, I just popup a browser window and display alert page telling the
> ueser frame is required for the application.  Does anyone know how to
> use VBScript to detect the host page structure or settings?  Is there
> something in the Active Server Pages Object Model I can query to find
> this out? Thanks.

Use the MSWC.BrowserType object:
set objBrowser=Server.CreateObject("MSWC.BrowserType")
blnFrames=objBrowser.Frames
If blnFrames then
    <do your page thing>
Else
    <warn user to use a frames-capable browser>
End If

Make sure your browscap.ini file is up to date



Sat, 08 Mar 2003 03:00:00 GMT  
 detect frame use

If Self.Location = Top.Location Then
     MsgBox "You're not in a frame"
Else
    MsgBox "You're inside a frame"
End If


: I am writing an ASP application which need to be display in a frame
are
: in the calling host page.  In order to display my page, I need to
: detect if the host page uses frame.  If frame is not used in the
host
: page, I just popup a browser window and display alert page telling
the
: ueser frame is required for the application.  Does anyone know how
to
: use VBScript to detect the host page structure or settings?  Is
there
: something in the Active Server Pages Object Model I can query to
find
: this out? Thanks.
:
:
: Sent via Deja.com http://www.deja.com/
: Before you buy.



Sat, 08 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Detecting cursor in Frame

2. Detect navigation within a browser frame?

3. Detecting if a page belongs to a frame

4. Detect Frame

5. Detecting page load complete in other frame

6. detecting parent frame

7. Detecting whether page has frames

8. Detecting page load in another frames

9. Detecting that frame has loaded a html page...

10. Detect browser type using serverside VBScript

11. getting query string from frame in jscript and getting frame name from another frame

12. Detect browsers using server side script

 

 
Powered by phpBB® Forum Software