473,569 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamic load of js script failure in IE 6

rh
Executing the script given below Opera, Netscape and Mozilla
successfully load the js file in both the "main" and "test" window.
However, while IE 6 manages to load OK in "main", it produces the
"Load failed in test" alert.

IE behaviour is the same if a local file is used for the js source, so
the problem doesn't appear to be zone security related.

Any ideas of what's wrong here, or what needs to be done to get it to
work in IE?

Thanks,

../rh

<html>
<head>
<script type="text/javascript"
src="http://www3.telus.net/rhall/testLoad.js"></script>
<script>
self.name = "main";
if (typeof myFunc != "undefined" ) alert("Loaded OK in "+self.name );
else alert("Load failed in "+self.name );

var win = window.open("", "test");
win.document.op en();
win.document.wr ite(
'<html>\n'
+ '<body>\n'
+ '<script type="text/javascript"
src="http://www3.telus.net/rhall/testLoad.js"> <\/script>\n'
+ '<script>\n'
+ ' if (typeof myFunc != "undefined" ) alert("Loaded OK in
"+self.name);\n '
+ ' else alert("Load failed in "+self.name);\n '
+ '<\/script>\n'
+ '</body>\n'
+ '</html>\n'
);
win.document.cl ose();
</script>
</head>
<body>
</body>
</html>
Jul 20 '05 #1
1 4305
rh
co********@yaho o.ca (rh) wrote in message news:<29******* *************** ****@posting.go ogle.com>...
Any ideas of what's wrong here, or what needs to be done to get it to
work in IE?


It turns out on further testing, the load of the js file actually
occurs in the "test" window in IE 6. But the loading is being done
asynchronously, and is not completed at the time the test for the
function presence is carried out. That's not supposed to happen
(unless there's a defer), right?
Jul 20 '05 #2

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

Similar topics

13
2876
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when the user selects shirts another combo box called 'size' would contain sizes in relation to shirts (ie. chest/neck size). the same would occur for...
4
4619
by: Daniel Keller | last post by:
Hello! I'm trying to set up a page system using "dynamic" SSI. That means that I normally use the following on my website: <!--#include virtual="file.inc" --> Now I want to make this "dynamic" and I don't have a clue how to do so. I want to link to a file using something like this: <a href="file.shtml?dynamic">Link</a>
1
1821
by: Jason Chan | last post by:
I have a paging datalist which show a list of thumbnail. Above the datalist there is a dropdown to jump to different paging. On Page_load, I bind the datalist according to the current page. On the same time, I have to generate a dynamic javascript to load the image in the datalist to an javascript array So I use Page.RegisterStartupScript...
19
2271
by: natG | last post by:
On a warehouse app, our Java clients constantly load/insert rows into the db. I would like to throttle these inserts (1.5 million rows per hr) from the Java app, based on current 'busy state' of the server. It would be nice if I can get the server CPU utilization (and other key factors) from db2 via jdbc. However, it needs to be low cost,...
2
2535
by: Lanky | last post by:
I am using the Dynamic Ajax Content script from Dynamic Drive (http://dynamicdrive.com/dynamicindex17/ajaxcontent.htm) and trying to load the Ultimate Fade-In Slide Show also from Dynamic Drive (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm.) Both work just fine independently, but the slide show script won't work when I try to...
9
2933
by: pbd22 | last post by:
Hi. This is just a disaster management question. I am using XMLHTTP for the dynamic loading of content in a very crucial area of my web site. Same as an IFrame, but using XMLHTTP and a DIV. I got the core of the javascript from here: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm I noticed in the demo that sometimes the...
0
1446
by: liz0001 | last post by:
I have seen many examples on how to use the .load() function to load in static elements, but I am trying to load a dynamic element, specifically a scrollable. I have gotten it to the point where: 1) the scrollable will function if I directly view PageToLoad.asp in the broswer. 2) the static elements of the scrollable will load onto...
0
7700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
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...
0
7924
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. ...
0
8125
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...
1
7676
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...
0
7974
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...
1
5513
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...
0
3653
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...
0
938
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...

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.