Objects and popup-windows

J

JonQuark

Hi,

I'm developing a Javascript intranet app that consists of a number of
windows. I have a variable called TopWin that points to the original,
first window (found using the opener method). Some javascript files
that are used everywhere are included only by that window and the
methods are called using TopWin e.g. TopWin.DoQuery(). Everything seems
fine in Firefox.

In IE6 I have a problem. If I want to instantiate an object from Topwin
inside a popup, it won't let me e.g.:
var fred = new TopWin.TableScan();
works from frames of TopWin but in other windows IE says:
"Invalid procedure call or argument"

Do I have to include the Javascript files in every window or is there a
more elegant solution? (I see the question has been asked here before;
April 23 2000 but no-one replied).

Thanks in advance for any help

Jon
 
I

Ivo

In IE6 I have a problem. If I want to instantiate an object from Topwin
inside a popup, it won't let me e.g.:
var fred = new TopWin.TableScan();
works from frames of TopWin but in other windows IE says:
"Invalid procedure call or argument"

Do I have to include the Javascript files in every window or is there a
more elegant solution?

Did you try:
TableScan=TopWin.TableScan;
var fred = new TableScan();

And what is wrong with including your script files in all pages? After they
've been downloaded, they are available straight from the cache.
hth
 
J

JonQuark

Did you try:
TableScan=TopWin.TableScan;
var fred = new TableScan();

Yes I did, it creates the object without error but I get an error when
I access the member variables. I have admitted defeat (at least for
now) and included the javascript in every window. This is inelegant as
I'm using TopWin method for transferring data between windows, when I'm
using objects they javascript is included locally which is inconsistent
and prevents using objects for certain things.

Ah well, hopefully one day IE7 will make this more consistent or other
browsers will make IE obselete....

Jon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top