Advertisement

07.12.2008 at 01:48PM PDT, ID: 23560024
[x]
Attachment Details

How do you call a Javascript that resides in a separate file from an HTML file?

Asked by drleewood in JavaScript

Tags: Java Script

I need to locate the validation scripts in a separate .js file.  I have five different HTML files with one form in each.  All five need to call the same validation script.  If I have to make changes in the validation script,  I would prefer to make only one change rather than have a copy of the script in each file and have to make five changes.  I need to syntax to include the validation file in each HTML file and the syntax of how to call the script from the file.  Also I understand that the script syntax is a little different if it does not reside in and HTML file but rather a .js file.  Also I read that some browsers may have trouble with including an external file.  Is this true?
Start Free Trial
 
 
[+][-]07.12.2008 at 01:59PM PDT, ID: 21990365

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.12.2008 at 02:00PM PDT, ID: 21990366

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.12.2008 at 02:02PM PDT, ID: 21990372

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.12.2008 at 02:26PM PDT, ID: 21990412

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.12.2008 at 02:34PM PDT, ID: 21990435

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: Java Script
Sign Up Now!
Solution Provided By: svelarsen
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628