/    Sign up×
Community /Pin to ProfileBookmark

include javascript problem

Hi

My project have 200 pages. now i need to add new javascript files there is already 3 javascript files in my project. It would take my time to include javascript file in every page. is there is another way to include it. Like can i include my javascript file in another existing javascript file so i would call new javascript function from existing js file. I hope you guys understand my point. Anyone can help me out.

Thanks
shahzeb

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Banana_AnandaJun 23.2007 — There are a few ways to solve this. The best would be to use some kind of server-side scripting, and prepared in advance.

1) Use a batch file editing program to edit all the HTML files at once.

2) Write an iclude into one of the other script files:

document.write(_new script tag_)

3) Add the contents of the new script file to one of the currently linked ones. This may be the best way.
×

Success!

Help @shahzebkn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...