What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » External JS files

External JS files
Author: Message:
WARlrus
New Member
*


Posts: 9
34 / Male / Flag
Joined: May 2009
O.P. External JS files
Hi,

I'm trying to tidy up my code a bit. Is there any way to include certain functions within the main JS file of a script?

For instance, with PHP I'd call include("functions.php"); to import functions from that page. Is there an equivalent within JS or the Messenger+ API?

Many thanks,
07-23-2009 05:02 PM
Profile E-Mail PM Web Find Quote Report
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
RE: External JS files
All you have to do is place the js files all in the same script folder for them to be loaded. No extra code is necessary.
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
07-23-2009 05:24 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: External JS files
http://mpscripts.net/docs/ref-msgplus-loadscriptfile.php
07-23-2009 05:51 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: External JS files
quote:
Originally posted by Scripting Docs

Remarks

The use of this function should be weighted carefully. For clarity reasons, all the files of your script should be loaded when the script is started. This function is only meant to be used if parts of your script are optional or don't require to be started immediately. Remember that all the files with a .js extension placed in your main script's directory are always automatically loaded before the script is started.

For security reasons, never use this function to run code you dynamically downloaded from the internet
<Eljay> "Problems encountered: shit blew up" :zippy:
07-23-2009 06:29 PM
Profile PM Find Quote Report
WARlrus
New Member
*


Posts: 9
34 / Male / Flag
Joined: May 2009
O.P. RE: External JS files
Thanks all!
07-23-2009 09:08 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On