ASM said the following on 11/21/2006 5:37 AM:
> Jeremy a écrit :
>>
>> What Randy means with the image source is that you can use some code
>> like this:
>>
>> ------------
>> var myScriptCall = new Image();
>> myScriptCall.src = "/path/to/my/script";
>> ------------
>
>
> I've tried that
>
> myScriptCall.src = 'script.js'
>
> file script.js :
>
> alert('seen');
>
>
> Nothing happens ... no message box
The .src of an Image won't execute script. If you want to load script.js
and have it executed, see this thread (or any other you can find
searching for my name and "loadJSFile" in it).
<URL:
http://groups-beta.google.com/group/comp.lang.javascript/browse_thread/thread/145dcdbddbb78612/5fb5e75ca498ae6b?lnk=gst&q=Randy+Webb+LoadJSFile&r num=4#5fb5e75ca498ae6b>
<URL:
http://groups-beta.google.com/group/comp.lang.javascript/browse_thread/thread/b1cee183e87aadc2/0b637acb0115f1f8?lnk=gst&q=Randy+Webb+LoadJSFile&r num=2#0b637acb0115f1f8>
The second one has a link to this page:
<URL: http://members.aol.com/_ht_a/hikksnotathome/loadJSFile/index.html>
Can you test that page for me if you have any browsers that aren't
listed on that page? If you have a different OS but the same version
browser I would appreciate that also as there may be an OS difference in
the page.
You should get an alert when the page loads, and then clicking on the
three buttons at the top you may or may not get an alert (depending on
whether that method worked or not). OS ver, browser name and version.
Anybody else reading this that can check that page and test it in any
browser/OS not listed and let me know it would be appreciated as well.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/