Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 10th, 2005, 07:26 PM
Authorized User
 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 1 Time in 1 Post
Default calling functions form another window

Hi all,

is there a way to call java or vb script functions form another window?

I have a window that opens another window on clicking a button. I want to call a function defined in the parent window from the child window. I assume, since you can access all elements in the parent window from the child window (using window.opener.document...), that functions would also be accessible. Is this possible? If so, can you give an example.

Much appreciated,

George.



 
Old November 11th, 2005, 05:12 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi George,

You can call a function in the opener using window.opener.myFunctionName();

HTH,

Chris

 
Old November 29th, 2005, 07:20 AM
Authorized User
 
Join Date: Nov 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cheers for that Chris was looking for how to do this also






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help calling and using a functions in visual c++ 6 method Visual C++ 0 July 8th, 2006 05:20 PM
Calling PHP functions from ASP Smoobly Classic ASP Basics 4 January 10th, 2005 06:11 PM
Calling functions ejmichaud Access VBA 2 July 16th, 2004 10:03 AM
calling functions with conditions Toka1 Javascript How-To 2 February 5th, 2004 09:29 AM
Calling functions in Windows? jacob C# 0 November 5th, 2003 03:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.