473,795 Members | 3,331 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help needed...js error

This is part of another quest for solution I've posted, but I'm getting no
responses.

My script is:

var popwin;
function launchwin(winur l,winname,winfe atures) {
if (popwin) {popwin.close() ;}
popwin = window.open(win url,winname,win features);
popwin.focus();
}

URL: http://www.edbj.itnava.com/brca.html

This works...to an extent. If the window launched is manually closed, and
then an attempt is made to re-open the window, the script fails with the
error: 'Type mismatch (usually a non-object value used where an object is
required) -- if (popwin).' The only way to re-use the function a second
time is to reload the page.

Help! Please... Thanks in advance.
--
Ed Jay (remove 'M' to respond by email)
Jul 27 '06 #1
1 1246
Ed Jay scribed:
>My script is:

var popwin;
function launchwin(winur l,winname,winfe atures) {
if (popwin) {popwin.close() ;}
popwin = window.open(win url,winname,win features);
popwin.focus();
}

This works...to an extent. If the window launched is manually closed, and
then an attempt is made to re-open the window, the script fails with the
error: 'Type mismatch (usually a non-object value used where an object is
required) -- if (popwin).' The only way to re-use the function a second
time is to reload the page.

Help! Please... Thanks in advance.
Solution: Use
try {popwin.close() ;} catch(e) {};
instead of
if (popwin) {popwin.close() ;}
--
Ed Jay (remove 'M' to respond by email)
Jul 29 '06 #2

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

Similar topics

28
3308
by: stu_gots | last post by:
I have been losing sleep over this puzzle, and I'm convinced my train of thought is heading in the wrong direction. It is difficult to explain my circumstances, so I will present an identical make-believe challenge in order to avoid confusing the issue further. Suppose I was hosting a dinner and I wanted to invite exactly 12 guests from my neighborhood. I'm really picky about that... I have 12 chairs besides my own, and I want them all...
5
3886
by: NG | last post by:
Hi, We are having DB2-V7.2 DB on AIX 5.2 machine. Recently we upgraded our system to fixpack 13 and activated activate AIX asynchronous IO function. Our DB is going to crash recovery with this error 0xFFFFF707. I have attached the related details. Any suggestions is much appreciated.
6
2883
by: Jamal | last post by:
I am working on binary files of struct ACTIONS I have a recursive qsort/mergesort hybrid that 1) i'm not a 100% sure works correctly 2) would like to convert to iteration Any comments or suggestion for improvements or conversion to iteration would be much appreciated
4
1344
by: cpptutor2000 | last post by:
I am trying to create a simple linked list. The source code is provided below. I receive the following error message: (Please see after source code). I have marked the lines where the error occurs with three '***'. #include "palmvector.h" struct palmvectornode{ char ch;
3
4733
by: DM | last post by:
newbie trying to set up a Database and keep getting the same result. ERROR An error occured while retrieving the information from the database: Unable to cast COM object of type 'System._ComObject' to interface type 'Microsoft.VisualStudio.OLE.Interop.IServiceProvider'. This operation failed because the QueryInterface call on th COM component for the interface with IID '{65D5140C1-7436-11CE-8034-00aa006009FA}' failed with HRESULT:...
10
14857
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the first method it is working fine. Then when I try to invoke the second method it return me an error, Just In-Time Debugging, with error message "An exception 'System.StackOverflowException' has occurred in WebServices"
5
3752
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional information: Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. It occurs when I attempt to add a new record. I've stripped out much of the code, leaving the pertinent (I hope) info. ...
1
3222
by: teddymeu | last post by:
hi guys I posted the other day regarding a solution i needed to design, im new to development an asp,net and built a local post office search tool using asp.net 2. vb in visual studio, using an sql express mdf database(this means the database is transferable with the solution even if the server doesnt have sql server on it) The app works fine, users can search, admins can edit data, insert and delete. The site also has membership and role...
0
1150
by: shantanuaggarwal | last post by:
Hi,, I have one following question that whether attributes can help me in resolving this problem: I have one base class called Employee and I have 3 classes which inherit it: EmployeeA EmployeeB EmployeeC
1
4934
by: janakivenk | last post by:
Hello, I am running Oracle 10g R2 in our office. I created the following procedure. It is suppose to access an xml file ( family.xml). The procedure is compiled and when I try to run it, i get the following error. SQL> execute domsample('c:\','song.xml','error.txt') BEGIN domsample('c:\','song.xml','error.txt * ERROR at line 1: ORA-31001: Invalid resource handle or path
0
10435
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...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9037
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
7538
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
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.