473,399 Members | 2,278 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,399 software developers and data experts.

IE doesn't load external javascript files

I'm *sure* this has to be a FAQ and I see discussions of this in the
clj archives, but I don't see the answer. Perhaps someone here can
point the clueless, but...

1. I create an HTML document that validates at w3c

2. I use:

<script language="JavaScript" type="text/javascript"
src="dashboard.js" ></script>

3. <body onload="something_in_dashboard_js()">

4. In Firefox, it works beautifully ( no shock )
5. In IE it does not ( no shock )
6. If i put the function in inline <scripttags in my HTML, the JS
runs fine (no syntax error).

Aug 21 '06 #1
5 2892
st**********@gmail.com said the following on 8/21/2006 11:31 AM:
I'm *sure* this has to be a FAQ and I see discussions of this in the
clj archives, but I don't see the answer. Perhaps someone here can
point the clueless, but...

1. I create an HTML document that validates at w3c
The language attribute validates at w3c?
2. I use:

<script language="JavaScript" type="text/javascript"
src="dashboard.js" ></script>

3. <body onload="something_in_dashboard_js()">

4. In Firefox, it works beautifully ( no shock )
5. In IE it does not ( no shock )
6. If i put the function in inline <scripttags in my HTML, the JS
runs fine (no syntax error).
Post a URL to a sample page, complete, that shows the behavior.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 21 '06 #2
Randy,

Upon taking your suggestion I moved the code to my web server ( instead
of the one on my corporate network ). You can view it at
'http://www.stevengharms.com/dash.html'.

The splash() code works just fine here (oddly enough) but the code
hasn't changed!

I'm even more baffled than I was before!

I just checked the page again to validate W3C validation, and it's
fine, so IB think the language attribute is still kosher in this DTD.

Steven

Randy Webb wrote:
st**********@gmail.com said the following on 8/21/2006 11:31 AM:
I'm *sure* this has to be a FAQ and I see discussions of this in the
clj archives, but I don't see the answer. Perhaps someone here can
point the clueless, but...

1. I create an HTML document that validates at w3c

The language attribute validates at w3c?
2. I use:

<script language="JavaScript" type="text/javascript"
src="dashboard.js" ></script>

3. <body onload="something_in_dashboard_js()">

4. In Firefox, it works beautifully ( no shock )
5. In IE it does not ( no shock )
6. If i put the function in inline <scripttags in my HTML, the JS
runs fine (no syntax error).

Post a URL to a sample page, complete, that shows the behavior.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 21 '06 #3
st**********@gmail.com wrote:
Randy,

Upon taking your suggestion I moved the code to my web server ( instead
of the one on my corporate network ). You can view it at
'http://www.stevengharms.com/dash.html'.

The splash() code works just fine here (oddly enough) but the code
hasn't changed!

I'm even more baffled than I was before!

I just checked the page again to validate W3C validation, and it's
fine, so IB think the language attribute is still kosher in this DTD.

Steven
Let me be the first to chastise you for top-posting ;-)

Perhaps the problem was an IE security-zone issue? If it works on the
new server and not the old, with no other changes (in file locations and
whatnot), I can't think of any other reason - except, perhaps, that the
old server was somehow mangling and / or mis-delivering your javascript
file.

Jeremy
Aug 21 '06 #4
I just checked the page again to validate W3C validation, and it's
fine, so IB think the language attribute is still kosher in this DTD.

Steven

Let me be the first to chastise you for top-posting ;-)

Perhaps the problem was an IE security-zone issue? If it works on the
new server and not the old, with no other changes (in file locations and
whatnot), I can't think of any other reason - except, perhaps, that the
old server was somehow mangling and / or mis-delivering your javascript
file.
An eagle-eyed developer friend noticed this, in my JSON hash statement
I had the line

something_block : {
"foo": "foot",
"bar" "bart",
}

Can you spot the error? That's right, that last comma creates the
message unhelpfully expressed by IE as "object expected".

Whew! Things are working now!

Steven

Aug 21 '06 #5
I found the error, for anyone searching the archives.

The issue was that in my JSON, I had left out a comma!

A great way to debug this was to put my JSON definition of a fairly
complex data structure at the END of the javascript file. After that I
could see that the functions were fine, it was just an error in my
declaration. Pretty basic stuff, but it's exactly that kind of thing
which'll getcha ;)

Steven

st**********@gmail.com wrote:
I just checked the page again to validate W3C validation, and it's
fine, so IB think the language attribute is still kosher in this DTD.
>
Steven
>
Let me be the first to chastise you for top-posting ;-)

Perhaps the problem was an IE security-zone issue? If it works on the
new server and not the old, with no other changes (in file locations and
whatnot), I can't think of any other reason - except, perhaps, that the
old server was somehow mangling and / or mis-delivering your javascript
file.

An eagle-eyed developer friend noticed this, in my JSON hash statement
I had the line

something_block : {
"foo": "foot",
"bar" "bart",
}

Can you spot the error? That's right, that last comma creates the
message unhelpfully expressed by IE as "object expected".

Whew! Things are working now!

Steven
Aug 24 '06 #6

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

Similar topics

2
by: KS | last post by:
I have a folder where i got all my external javascript.js files saved. Using the external.js files in my .jsp files works fin by: <script language="JavaScript"...
3
by: jason baumunk | last post by:
I author applications in php which use external stylesheets. When viewed through ie 6, netscape 6, et al. occassionally the stylesheets will not load or be applied. Has anybody encountered this...
6
by: sylcheung | last post by:
Hi, How can I be notified when the document load is complet in JavaScript? I am referring to the whold document load is complete, mean all images/external files/frame/iframes have been loaded. ...
1
by: mb | last post by:
Hi, I picked up this JavaScript code (quiz code) at: http://javascript.internet.com/miscellaneous/multiple-choice-quiz.html and modified it (and may have deleted some line I shouldn't have) so...
6
by: jeet_sen | last post by:
Hi, I have a file containing variables defined in javascript syntax, like, var a = 15; var list = ; .. .. I want to load this external file dynamically and read in the data. I can successfuly...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
2
by: Jeff Allan | last post by:
Hello, I am trying to load an external HTML page into a DIV tag with .NET 05 and I can't figure it out. Any suggestions? My Scenario: - Gridview populated with list of available files - I...
4
by: fmaxwell | last post by:
Dear Group I have a very frustrating problem. I have been trying to make it more difficult to access external javascript files by using PHP sessions. This works beautifully locally (both in...
1
by: charlie imac | last post by:
I have a question on the capability of Ajax. My question is: Is it possible to dynamically load any of the javascript gallery programs such as: Adobe Spry Gallery SmoothGallery others I...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.