/    Sign up×
Community /Pin to ProfileBookmark

Include Javascript inside a Javascript

I want to include a javascript file inside a javascript file. Can someone let me know the syntax of the include statement to include javascript inside a javascript file. Thanx in advance.

-KK

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@LeeUFeb 01.2006 — See the thread [URL=http://www.webdeveloper.com/forum/showthread.php?t=93461]here[/URL]
Copy linkTweet thisAlerts:
@kirru66authorFeb 01.2006 — Yes, I tried using the following two statements in the first line of my .js file and still it is not working. I have given the actual name of .js file not 2.js file.

Please let me know where i should use the statement in my .js file at the top or some where else?

document.write('<scr'+'ipt type="text/javascript" src="2.js" ></scr'+'ipt>');

document.write('<script type="text/javascript" src="2.js"></script>');

Thanks,

KK
×

Success!

Help @kirru66 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,
)...