Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling Outside Functions

    Can one call a function outside of the current window. I'm using a frame system, and have two frames: toc, and main. I want to call a function from toc in main.

    Here's the code:

    document.write('<center><input type="button" value="Finished" onClick="parent.toc.submit();"></center></form>');

    It's under a form, so that's why I'm using a </form>. Any help would be appreciated.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try

    parent.main.document.formName.submit()

    where formName is the name of your form
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

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