Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Experts help needed - Problem with Links in Netscape

Status
Not open for further replies.

Weese

Programmer
Apr 3, 2003
17
My HTML page uses two three external javascript like this.

<SCRIPT language=&quot;JavaScript&quot; src=&quot;MyScript.js&quot;>;
</SCRIPT>
<SCRIPT>if (typeof(MyScript) == &quot;undefined&quot;) alert(&quot;Could not load
MyScript.js&quot;);</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 &quot;Could not load MyScript.js&quot; 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.
 
Hai All,

Here I closely watch what is going on behind.
My HTMLPage1 contains javascript function submitForm()
which is used to do some validations before submit.
My HTMLPage2 also contains javascript function submitForm()
doing some validations before that page gets submitted.

In my case,
HTMLPage1 contains a link and on onclick I am calling the function submitForm associated with it.When I click that link continously, the situation comes that second page starts loaded. But the first page is still there on the browser and at that time if user clicks the link in HTMLPage1 calls the function submitForm() of HTMLPage2.

For some standard, I have to use the same name function submitForm() all over the pages.

Is there any work around.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top