473,406 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Creating a window

I am using the following javacript function (in the HEAD section of the
HTML file) to open a window in response to user action on the page:

<SCRIPT LANGUAGE="JavaScript">
var PictureWindow;
var s;
function displayImage(ImageName, titleText )
{
PictureWindow = window.open()
s = "<HTML>\n";
s += " <HEAD>\n";
s += " <TITLE> </TITLE>\n";
s += " </HEAD>\n";
s += " <BODY>\n";
s += " <CENTER>\n";
s += " <IMG SRC=\""+ImageName+"\" ALT=\"\" BORDER=0>\n";
s += " <BR><BR>\n";
s += " <h4>\n";
s += titleText;
s += " </h4>\n";
s += " <BR>\n";
s += " <A HREF='javascript:close()'>Close</A>"
s += " </BODY>\n";
s += "</HTML>\n";
PictureWindow.document.write(s);
}
</SCRIPT>

The function works with no trouble in IE. In Netscape, it works, sort of.
It will create and open the window but will not complete the open process
(hour glass keeps on).

Why does this work ok in IE but not Netscape?

Thanks

Jul 20 '05 #1
1 1707
On Tue, 26 Aug 2003 03:31:16 +0000, Jerrold Kronenfeld wrote:
I am using the following javacript function (in the HEAD section of the
HTML file) to open a window in response to user action on the page:

<SCRIPT LANGUAGE="JavaScript">
var PictureWindow;
var s;
function displayImage(ImageName, titleText )
{
PictureWindow = window.open()
s = "<HTML>\n";
s += " <HEAD>\n";
s += " <TITLE> </TITLE>\n";
s += " </HEAD>\n";
s += " <BODY>\n";
s += " <CENTER>\n";
s += " <IMG SRC=\""+ImageName+"\" ALT=\"\" BORDER=0>\n";
s += " <BR><BR>\n";
s += " <h4>\n";
s += titleText;
s += " </h4>\n";
s += " <BR>\n";
s += " <A HREF='javascript:close()'>Close</A>"
s += " </BODY>\n";
s += "</HTML>\n";
PictureWindow.document.write(s);
}
</SCRIPT>

The function works with no trouble in IE. In Netscape, it works, sort of.
It will create and open the window but will not complete the open process
(hour glass keeps on).

Why does this work ok in IE but not Netscape?

Thanks

Hi.

You need to close the document that you are writing for the hour glass to
disappear, I'm no expert here just in the very early stages of learning js
and passed that part of the book just a few weeks ago. Try

PictureWindow.document.close() this will close the output stream.

Have fun
DaveG
Jul 20 '05 #2

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

Similar topics

22
by: Tom Moroow | last post by:
Hi, I'm pretty new to javascript and was wondering how you would piece together a variable name and then assign it a value. I want to create a hidden field and assign it a value based on the value...
4
by: Altramagnus | last post by:
I have 30 - 40 type of different window. For each type I need about 20 instances of the window. When I try to create them, I get "Error creating window handle" My guess is there is a maximum...
0
by: Matt Warner | last post by:
Hi guys, A couple of people have already posted questions about similar issues but haven't had any response. Occasionally, sometimes after running the app for a few hours, it bombs out saying...
24
by: jonathon | last post by:
Hi all, I have a web app with a popup window for entering data. I don't want to access the web every time this window is opened, as most of the app is AJAX. But I can't figure out how to open...
6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
8
by: David W. Simmonds | last post by:
Is there an easy way to create a new browser window from C# and ASP.NET? I would just like to have a popup window without any menus or toolbars that would contain a high-res image. The low-res...
9
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll I added importing namespaces for 'System.Object',...
0
by: Steve | last post by:
Some end users are getting the following message after being in the application for quite some time. Exception Type: System.ComponentModel.Win32Exception NativeErrorCode: 14 ErrorCode:...
11
by: rayala | last post by:
Hi all, I am having very weird problem in my Outlook I am running my web application from with in Outlook.I found a strange problem that it is creating different sessionId if i open a new...
5
by: John Scott | last post by:
Ok..this a rather odd question/problem. I haven't really found a straight forward answer to how to handle this scenario, so I hope someone here can help. Here it is: I have an application...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.