473,761 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="JavaS cript" type="text/javascript"
src="dashboard. js" ></script>

3. <body onload="somethi ng_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 2940
st**********@gm ail.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="JavaS cript" type="text/javascript"
src="dashboard. js" ></script>

3. <body onload="somethi ng_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.javas cript 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.stevengharm s.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**********@gm ail.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="JavaS cript" type="text/javascript"
src="dashboard. js" ></script>

3. <body onload="somethi ng_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.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 21 '06 #3
st**********@gm ail.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.stevengharm s.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**********@gm ail.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
4246
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" src="/PlexSysWeb/javascript/disableObjekt.js"> </script><script language="JavaScript" src="/PlexSysWeb/javascript/respons.js"></script>
3
4071
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 and found a fix/workaround so that the stylesheets are verified as having been loaded/applied? I'm running apache and the external stylesheets are actually php files that serve dynamic stylesheets(ie, site.css.php......I don't suspect that this...
6
2365
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. I think there is a window.addEventListener() function but I am not sure which event to listen to. Thank you.
1
2268
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 that it looks like this on my web site: http://www.goalseek.net/Scripts/qa_XL_History.htm
6
7059
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 read this file content if I include the file statically in the head section in my page. But when I am trying to include the file using DHTML, i cannot source it.
9
2781
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 IS IMPOSSIBLE TO PROGRAMMATICALLY ADD A BUTTON TO A DYNAMICALLY CREATED PAGE. Or, to be more precise, why it is impossible to have an onClick sub respond to that button’s Click event. My main page has only one line:
2
1524
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 can get the external page to load in a new window just fine - I would like the detail to show on the same page, below the list. - I can't use the detail control and dynamically create the page as these
4
2643
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 IE6 and IE7) and online in IE7, but frustratingly, online in IE6, the javascript does not render on the page, unless you refresh the page. Is there something different about the way IE6 handles sessions? Why
1
3602
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 know using ExtJS I can load html using Ajax. What I can't do is load html containing scripts. I didn't want to use IFRAME. I've looked at
0
9522
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10111
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...
0
9948
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9902
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
8770
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
7327
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
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.