External Script Loading 
Author Message
 External Script Loading

Hi All,

Hopefully somebody can shed some light on this problem for me. I have
been enquiring about the possibilities of forcing my JavaScript to load
synchronously, and T-Man has helped me fix the errors that were
occuring. However, my problem is that now, usually on the first visit
to the page and / or after clearing the cache, the external .js file
simply does not load.

The .js file is about 12KB, and when this problem happens, I debug the
running documents using Visual Interdev, only to find a blank .js
document. No matter how long I wait, none of the script is there, and
consequently none of my functions work!! This really is bizarre, as I
understood that as long as the path, etc... were correct, the file
should always be loaded, albeit perhaps slowly.

I am using the <script language="JavaScript" src="myFile.js"/> element
to load the script, and this sits immediately after the </head> tag.

Any insight would be greatly appreciated, as I am begining to give up
hope of ever fixing this problem!

TIA,
Patrick

Sent via Deja.com
http://www.*-*-*.com/



Sun, 20 Jul 2003 19:44:13 GMT  
 External Script Loading
don't even know there significance or impact in this situation but two things come to mind when reading the below...

1) Why _AFTER_ the </HEAD> and not _INSIDE_ the block
2) tried adding 'type=text/javascript' to the tag?

<head>

<script language='JavaScript' type='text/javascript' src='yourfile.js'></script>
</head>

FWIW
T.G.

Quote:

> Hi All,

> Hopefully somebody can shed some light on this problem for me. I have
> been enquiring about the possibilities of forcing my JavaScript to load
> synchronously, and T-Man has helped me fix the errors that were
> occuring. However, my problem is that now, usually on the first visit
> to the page and / or after clearing the cache, the external .js file
> simply does not load.

> The .js file is about 12KB, and when this problem happens, I debug the
> running documents using Visual Interdev, only to find a blank .js
> document. No matter how long I wait, none of the script is there, and
> consequently none of my functions work!! This really is bizarre, as I
> understood that as long as the path, etc... were correct, the file
> should always be loaded, albeit perhaps slowly.

> I am using the <script language="JavaScript" src="myFile.js"/> element
> to load the script, and this sits immediately after the </head> tag.

> Any insight would be greatly appreciated, as I am begining to give up
> hope of ever fixing this problem!

> TIA,
> Patrick

> Sent via Deja.com
> http://www.deja.com/



Mon, 21 Jul 2003 00:07:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. External script file reference doesn't load in time

2. IE4 ignores charset if loading external javascript

3. Problem: Loading a large external jscript file

4. Execute external PHP/ASP script from JS

5. submitting a form from external script..

6. call an external script in a function

7. Can an ASP script launch an external task?

8. script for adding external email contacts

9. External script calling

10. Including External ASP scripts

11. Start external application by ASP script

12. making an external scripting run in-process

 

 
Powered by phpBB® Forum Software