Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-10-2005, 06:16 AM   PM User | #1
suendisra
New Coder

 
Join Date: Mar 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
suendisra is an unknown quantity at this point
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.
suendisra is offline   Reply With Quote
Old 04-10-2005, 09:01 AM   PM User | #2
Mr J
Senior Coder

 
Join Date: Aug 2002
Location: UK
Posts: 2,789
Thanks: 2
Thanked 14 Times in 14 Posts
Mr J is on a distinguished road
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.
Mr J is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:02 PM.


Advertisement
Log in to turn off these ads.