Detecting target frame (if any) in ASP?

Discussion in 'ASP General' started by Catherine Lynn Smith, Oct 9, 2003.

  1. Is there a way in ASP to figure out if a page that is being loaded is
    being loaded into a frameset? I know I can code this in javascript,
    but I would prefer to only inject a chunk of 'onload' code in the body
    tag if in fact the page is being loaded in a specific frameset.

    Any help is greatly appreciated.

    Kathy Lynn
    Catherine Lynn Smith, Oct 9, 2003
    #1
    1. Advertising

  2. Catherine Lynn Smith

    Evertjan. Guest

    Catherine Lynn Smith wrote on 09 okt 2003 in
    microsoft.public.inetserver.asp.general:
    > Is there a way in ASP to figure out if a page that is being loaded is
    > being loaded into a frameset? I know I can code this in javascript,
    > but I would prefer to only inject a chunk of 'onload' code in the body
    > tag if in fact the page is being loaded in a specific frameset.


    ASP is serverside code and completely unaware and ignorant of frames.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Oct 9, 2003
    #2
    1. Advertising

  3. Catherine Lynn Smith

    Bob Barrows Guest

    Catherine Lynn Smith wrote:
    > Is there a way in ASP to figure out if a page that is being loaded is
    > being loaded into a frameset? I know I can code this in javascript,
    > but I would prefer to only inject a chunk of 'onload' code in the body
    > tag if in fact the page is being loaded in a specific frameset.
    >

    There is no way to detect this in asp.

    It shouldn't be too hard to include code in the onload code to check to see
    if a parent document exists before doing whatever it is you want it to do.

    Bob Barrows
    Bob Barrows, Oct 9, 2003
    #3
  4. Catherine Lynn Smith

    Hannibal Guest

    <body onload="frameCheck()">

    how difficult is that?


    "Bob Barrows" <> wrote in message
    news:...
    > Catherine Lynn Smith wrote:
    > > Is there a way in ASP to figure out if a page that is being loaded is
    > > being loaded into a frameset? I know I can code this in javascript,
    > > but I would prefer to only inject a chunk of 'onload' code in the body
    > > tag if in fact the page is being loaded in a specific frameset.
    > >

    > There is no way to detect this in asp.
    >
    > It shouldn't be too hard to include code in the onload code to check to

    see
    > if a parent document exists before doing whatever it is you want it to do.
    >
    > Bob Barrows
    >
    >
    Hannibal, Oct 10, 2003
    #4
  5. Catherine Lynn Smith

    Bob Barrows Guest

    Is this directed to me?
    Hannibal wrote:
    > <body onload="frameCheck()">
    >
    > how difficult is that?
    >

    Not difficult at all in client-side code. The question asked if it could be
    done in asp.

    Can't be done: asp (server-side) code knows nothing about body, or onload,
    let alone framesets.

    This is a client-side operation.

    Bob Barrows
    Bob Barrows, Oct 10, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mohit
    Replies:
    0
    Views:
    530
    mohit
    Jan 23, 2008
  2. M P

    Target Frame on ASP

    M P, Feb 18, 2004, in forum: ASP General
    Replies:
    2
    Views:
    137
  3. 2hawks

    ASP variable in HTML frame target?

    2hawks, Aug 25, 2006, in forum: ASP General
    Replies:
    3
    Views:
    261
    2hawks
    Aug 27, 2006
  4. Replies:
    2
    Views:
    179
  5. Martyr2

    Detecting image id of drop target

    Martyr2, Mar 6, 2006, in forum: Javascript
    Replies:
    2
    Views:
    119
    Martyr2
    Mar 7, 2006
Loading...

Share This Page