aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes how call javascript function from button in different frameset Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "how call javascript function from button in different frameset" Watch "how call javascript function from button in different frameset" New topic
Author

how call javascript function from button in different frameset

Herbert Kornfeld
Ranch Hand

Joined: Apr 16, 2003
Posts: 32
Hi,
What I want to do is call a javascript function which contains a submit of a particular form, from a button inside a different frame.
I am sure this is possible but I don't know the syntax and my attempts are not working.
Many Thanks
Michael McNally
Ranch Hand

Joined: Aug 22, 2002
Posts: 53
i am not 100% sure on this one. But, I believe the first step is creating a name for the window where the form is located. place this code in that page...

next, in the frame that will invoke the function, you must call function by first accessing the window name and then by accessing the form name like this...

Make sure you name your form like this...
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
you can call it by
parent.FrameName.FunctionName();
Herbert Kornfeld
Ranch Hand

Joined: Apr 16, 2003
Posts: 32
parent.FrameName.FunctionName();
works perfectly -
didn't think it was that easy!
Thanks!
Michael McNally
Ranch Hand

Joined: Aug 22, 2002
Posts: 53
I forgot about that one. sorry. lol
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how call javascript function from button in different frameset
 
Similar Threads
calling a servlet from javascript function??
jsp and javascript
Double submit issue using JSF
JOptionPane No X11 DISPLAY error
Determining which button was clicked?