H
Henri
Hi,
Is there a way to include a .js file inside a .js file in JavaScript 1.5?
Thanx
Henri
Is there a way to include a .js file inside a .js file in JavaScript 1.5?
Thanx
Henri
Hi,
Is there a way to include a .js file inside a .js file in JavaScript 1.5?
kaeli said:Not that I know of. If you figure one out, I'd love to see it. I'm tired of
having to copy/paste library functions, too.
In the included file either document.write the script tag to include the
second file, or, createElement and load it.
Of course, with server side coding, it becomes trivial to add an include
statement to include the external file.
ferndoc9 said:Unless I'm misunderstanding this, you're barking up the wrong tree here.
kaeli said:I don't think that would work for what I want it for.
I have a library file called jsValidation.js with generic functions for
things like testing for blank fields, format of phone number, and so on.
I also have one called jsEvents.js with a way to add events in a cross-
browser fashion. It has a function called addEvent.
Now, say I want to make a third js file and I want to call functions isBlank
from the validation file and addEvent from the event file.
I don't think I can do that. Do you know a way?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.