473,394 Members | 1,785 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,394 software developers and data experts.

Javascript generated html page crashes Explorer, but not Mozilla

Hi, if anyone can help with this I'd be very grateful:

I'm generating an html popup window with Javascript. When the popup appears in Explorer 6.0 it is empty and crashes the browser, though it works in Mozilla.

In the generated code I'm linking to a Javascript file "artscripts.js". When I remove this line of code the script works fine (except of course I can't call the javascript functions contained in the linked file).

The first part of the code that generates the popup is as follows:

Expand|Select|Wrap|Line Numbers
  1. function enlarge(theimage)
  2.    {
  3.  
  4.    win2=window.open('','win2','width=600,height=600,location=no,menubar=no,scrollbars=yes,resizable=yes');
  5.    win2.focus();
  6.    win2.document.open();
  7.    win2.document.writeln('<HTML>');
  8.    win2.document.writeln('<HEAD>');
  9.    win2.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
  10.    win2.document.writeln('<TITLE>Enlarged view</TITLE>');
  11.    win2.document.writeln('<script src="artscripts.js" language="JavaScript" language="javascript1.2"></script>');
  12.    win2.document.writeln('<link href="styles.css" rel="stylesheet" type="text/css" />');
  13.    win2.document.writeln('</HEAD>');
  14.    win2.document.write('<BODY id="popupbody">');
Any ideas?

Thanks
Laura
Sep 20 '06 #1
2 1342
acoder
16,027 Expert Mod 8TB
Difficult to say without seeing the JavaScript file, but I would remove the language attributes for the script tag. It's deprecated in favour of the type attribute.
May 14 '08 #2
Logician
210 100+
Presumably the function does close the HTML.

Expand|Select|Wrap|Line Numbers
  1.  win2.document.writeln('<script src="artscripts.js" language="JavaScript" language="javascript1.2"></script>');
When writing <script> tags they should be closed like this: <\/script>

If that doesn't work you'll need to show more code.
May 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
3
by: Liza | last post by:
dear all, does a client side script always need a server side script in order to function? how can i get my javascript application to send the details of a user filled form to me without...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.