Weese
Programmer
- Apr 3, 2003
- 17
My HTML page uses two three external javascript like this.
<SCRIPT language="JavaScript" src="MyScript.js">;
</SCRIPT>
<SCRIPT>if (typeof(MyScript) == "undefined"
alert("Could not load
MyScript.js"
;</SCRIPT>
I am having a variable defined in MyScript.js
var MyScript = true;
Everything is cool when we work with the page professionally.
But the problem arise when the user clicks a link in the page continously.
I am getting the alert message "Could not load MyScript.js" and after clicking ok leads to error page.
Expected result is when we click that link should open, another page.
It seems that when we click that link continously, the current page itself gets reloaded and not able to find the associated javascript file.
onClick of the link, I am calling a function submitForm().
After error page when I look into the javascript console,error saying submitForm() not defined.
But working fine in IE.
<SCRIPT language="JavaScript" src="MyScript.js">;
</SCRIPT>
<SCRIPT>if (typeof(MyScript) == "undefined"
MyScript.js"
I am having a variable defined in MyScript.js
var MyScript = true;
Everything is cool when we work with the page professionally.
But the problem arise when the user clicks a link in the page continously.
I am getting the alert message "Could not load MyScript.js" and after clicking ok leads to error page.
Expected result is when we click that link should open, another page.
It seems that when we click that link continously, the current page itself gets reloaded and not able to find the associated javascript file.
onClick of the link, I am calling a function submitForm().
After error page when I look into the javascript console,error saying submitForm() not defined.
But working fine in IE.