/    Sign up×
Community /Pin to ProfileBookmark

One js file to rule them all

Hi! I am trying to get rid of all <script>

[code] </script> in my website. I tried to create one allfunction.js, with everything inside. How do I do it? I tried, but did not work. Can someone link a tutorial here?

See ya!

GouSan

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@toicontienApr 06.2006 — <script type="text/javascript" src="/url/to/file.js"></script>
Copy linkTweet thisAlerts:
@GouSanauthorApr 06.2006 — I did that toicontien. The problem lies in file.js, how do I do this .js, just normal codes or do I have to add something else?

See ya!

GouSan
Copy linkTweet thisAlerts:
@bubba4gmanApr 06.2006 — If you I understand correctly what you are wanting to do, you just need to copy your code and paste it into a new file in notepad, or whatever you are using, and then do save-as. Just save it as file.js. If already saved it, just rename the file and change the file extension to .js.

You don't need to do anything special.

Hope that helps you out.

Gman
Copy linkTweet thisAlerts:
@toicontienApr 06.2006 — Only JavaScript can go in the .js file. No HTML. Omit the <script> tags and the HTML comment that can encompass your javascript.

If you're still in need of help, please post the full HTML and JavaScript. Otherwise, we're just shooting in the dark here.
Copy linkTweet thisAlerts:
@GouSanauthorApr 06.2006 — Thanks toicontien! I found one html tag in the middle of the archive. It is working fine now!

See ya!

Gou-San
×

Success!

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