Execute a vbscript function in a parent frame from an iframe


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Execute a vbscript function in a parent frame from an iframe

  1. #1
    Rodney Kendall Guest

    Execute a vbscript function in a parent frame from an iframe


    I have a b2b site which I originally wrote with a number of SPANs which are
    dynamically shown and hidden as the user selects navigation links on the
    left and top. This creates the effect of a child frame. The obvious problem
    is the speed of downloading all of the various pages together instead on
    in a FRAME. I am converting the content of each SPAN to be an IFRAME with
    the source page containing the code that used to be the SPAN.

    The problem is that I need to call a function in the parent frame to hide
    the other SPANs in the parent frame when certain links are selected within
    one of the IFRAMEs. Does anyone know the syntax (if any) of how to call
    a function within a VBScript SCRIPT block in a parent frame from a child
    frame? Is this even possible? I have tried the 'SCRIPTS' collection, but,
    MSDN only gives the syntax, not how to do anything useful with the items
    in the collection.

  2. #2
    Chris Guest

    Re: Execute a vbscript function in a parent frame from an iframe


    You could try...
    window.opener.vbscriptname();
    or, window.opener.document.vbscriptname();
    something like that should work. You may be able to target the referring
    page or opening page by using window.opener, or document.referrer, or window.top
    or something like this.

    "Rodney Kendall" <rkendall@consultant.com> wrote:
    >
    >I have a b2b site which I originally wrote with a number of SPANs which

    are
    >dynamically shown and hidden as the user selects navigation links on the
    >left and top. This creates the effect of a child frame. The obvious problem
    >is the speed of downloading all of the various pages together instead on
    >in a FRAME. I am converting the content of each SPAN to be an IFRAME with
    >the source page containing the code that used to be the SPAN.
    >
    >The problem is that I need to call a function in the parent frame to hide
    >the other SPANs in the parent frame when certain links are selected within
    >one of the IFRAMEs. Does anyone know the syntax (if any) of how to call
    >a function within a VBScript SCRIPT block in a parent frame from a child
    >frame? Is this even possible? I have tried the 'SCRIPTS' collection, but,
    >MSDN only gives the syntax, not how to do anything useful with the items
    >in the collection.



  3. #3
    Steve Berzins Guest

    Re: Execute a vbscript function in a parent frame from an iframe

    in javascript it is...
    self.parent.functionName(parameters...);
    so it should work like this in vbscript as well I would think. only
    difference AFIAK is in javascript case matters, in vb script it should not.


    "Rodney Kendall" <rkendall@consultant.com> wrote in message
    news:3b26cb8f$1@news.devx.com...
    >
    > I have a b2b site which I originally wrote with a number of SPANs which

    are
    > dynamically shown and hidden as the user selects navigation links on the
    > left and top. This creates the effect of a child frame. The obvious

    problem
    > is the speed of downloading all of the various pages together instead on
    > in a FRAME. I am converting the content of each SPAN to be an IFRAME with
    > the source page containing the code that used to be the SPAN.
    >
    > The problem is that I need to call a function in the parent frame to hide
    > the other SPANs in the parent frame when certain links are selected within
    > one of the IFRAMEs. Does anyone know the syntax (if any) of how to call
    > a function within a VBScript SCRIPT block in a parent frame from a child
    > frame? Is this even possible? I have tried the 'SCRIPTS' collection,

    but,
    > MSDN only gives the syntax, not how to do anything useful with the items
    > in the collection.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center