Results 1 to 2 of 2

Thread: Calling a function thats in a parrent page

  1. #1

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390

    Calling a function thats in a parrent page

    ok - i have a web page with the following in it :

    Code:
    <script>
    public function doStuff() {
    bla bla
    }
    </script>
    now what i want to do is call that function from a child page that is embeded within an iframe so heres how i have tried to call it:

    Code:
    <script>
    parent.document.doStuff()
    </script>
    and also

    Code:
    <script>
    parent.doStuff()
    </script>
    however none of these work - what am i doing wrong ?

    Thanks in advance
    Kris Bennett

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Calling a function thats in a parrent page

    Try window.parent.window.doStuff(). It should work.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width