473,624 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Objects and popup-windows

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.TableSca n();
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

Jul 23 '05 #1
2 1424
Ivo
"JonQuark" wrote

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.TableSca n();
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=TopWi n.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
--
Ivo

Jul 23 '05 #2
<Unable to instantiate new objects from another window in IE>
Do I have to include the Javascript files in every window or is there a more elegant solution?
<Ivo wrote:>Did you try:
TableScan=TopWi n.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.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2991
by: Mica Cooper | last post by:
Hi, I have a series of Select menus on a page. I am trying to allow the user to click on the Select title and have it popup a help window. This works fine with the following code except that all the Select choices are lost. <A HREF="javascript:location='menu.jsp';window.open('menuhelp.jsp?menuID=5','me nuhelp',)">MenuTitle</A> I saw an example of a popup on a website that did not lose the menu choices.
10
3068
by: soup_or_power | last post by:
The pop up window has several checkboxes. I'm unable to access the checkboxes using the handle from window.open. Any way to do this? var display; function showSugg(but_id, sugg1, sugg2, sugg3, sugg4, sugg5) { display=window.open('','_blank','menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=150,width=190')
2
1472
by: E. Paul Wileyto | last post by:
Can anyone help. I would like to create a table that contains references to a series of JPG files, so that I can view each image and related data in a form, page by page. It seems that the only way to insert the reference to the image is using the "Insert Image" dialog box, and with my long list of images, I'll be old & gray by the time I am done. What I really want to do is type in the list of filenames (or cut&paste), and have them...
5
3169
by: Alan Ho | last post by:
What are intrinsic objects of asp.net? thx
5
1495
by: Alex D. | last post by:
is there any way to automatically convert .net objects to javascripts objects? for example to send the bussiness logic to the browser and this way reduce the postbacks to the server? I think it would be nice to have the ability in Visual Studio to switch a class or object between server-side and client-side...something to think about? alex.
1
1848
by: anagai | last post by:
Im wondering if generating html objects such as tabels and rows in javascript is faster than typing the html directly? Seems when you do it in javascript you have to download alot of code and would slow down displaying the page. while if you just type the html, it requires less bandwidth and display faster? is parsing html to display in browser slower than doing it through dom to display the same html objects on the page?
3
2109
by: kosmodisk | last post by:
Hi, I'm having problem accessing javascript-created elements from opened window. This occurs only when I'm including another files in opened window, javascript or css. When I comment out "<link>" and "<script>" (point (0)), the script works fine. The opening window itself (point (1)) can access the object. When page has been loaded, then I can access the object also (point (3)). The script does find included files (debug_test2.css and...
1
1295
by: Lorenzo Thurman | last post by:
I'd like for some elements to be draggable. I've found some code examples around the 'net on how to do this, but I have one requirement that none of them addresses: The item I need to move is a "popup" in a hidden div that gets displayed when a user clicks on another element. This "popup" has a border at the top. When a user clicks and drags the border, I want the popup to "drag". I don't want the popup to respond if the body of the...
1
2710
by: elizayiu | last post by:
Hi, I need to write a webpage which does the following: - open up a window and pass parameters into it (i.e. need to call showModalDialog() or showModelessDialog()) - contains jscript to support drag and drop objects from itself to the popup window - wait for user response in popup window and return results back to the parent window (i.e. calling showModalDialog() is preferred)
0
8170
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8619
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7158
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6108
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2604
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.