Click to See Complete Forum and Search --> : URGENT: Advanced scripters please help


Scriptage
07-14-2003, 08:53 PM
I would like to call a function on a page from a created pop up window. Is this possible?
Thanks in advance

hmm edit....

I can call functions that alert etc but I want to be able to access an object on the main page using the opened pop up.
I cant seem to get it to work...It's like the function is carried into the pop up and the pop up is acting like the function was written in the pop up window...if that makes sense!

pyro
07-14-2003, 09:02 PM
Not really sure what you are asking.

window.opener.functionName() to run a function
and
window.opener.variablename = "your text"; to set a variables value...

Scriptage
07-14-2003, 09:17 PM
cheers pyro for your reply...

I'm doing some oop...

in its simplist form:

I have an object called options which is an instance of selectBox.

options contains the variable value and a function called build.

selectBox (therefore options) has a function called change which changes the data inside the variable value.

when i call build: options.build();

a pop up window with a selection list is built.

when an option is clicked I would like to call options.change(1) for example, in the parent window.

Everytime I attempt to do so I get an error saying this.value is null or not an object

Regards

Scriptage
07-14-2003, 09:20 PM
just seen where ive gone wrong lol

pyro
07-14-2003, 09:28 PM
So, it's working now?

Scriptage
07-14-2003, 10:00 PM
yeah, there was a problem with the dynamic generation of a varible in the instance of selectBox, but i fixed it

cheers for your help

pyro
07-14-2003, 10:01 PM
Ok, good... You're welcome.