include or getscript external JS file via online version of QUEST
qroft
17 Jan 2015, 01:28Hi,
i am trying to implement an external .js file via the online version of QUEST.
This is my actual theory that does not work:
I am inside Objects->Game->Script:START SCRIPT
Here in OUTPUT->ADD NEW SCRIPT i choose RUN JAVASCRIPT
In the input field for JAVASCRIPT i added http://www.cyberholic.es/test.js
But this does not work.
Is it possible to "embed" external JS files?
Thanks and have a good night,
Carlos
i am trying to implement an external .js file via the online version of QUEST.
This is my actual theory that does not work:
I am inside Objects->Game->Script:START SCRIPT
Here in OUTPUT->ADD NEW SCRIPT i choose RUN JAVASCRIPT
In the input field for JAVASCRIPT i added http://www.cyberholic.es/test.js
But this does not work.
Is it possible to "embed" external JS files?
Thanks and have a good night,
Carlos

jaynabonne
17 Jan 2015, 13:39This might be helpful: http://stackoverflow.com/questions/5132 ... javascript
(Since you're using JavaScript, I'll assume that makes sense to you. If not, ask and I'll help further.) You can have a local .js file that has a function that injects the script using that method (e.g. a function named LoadMyScript). Then you can invoke it from your code with JS.LoadMyScript.
As I said, if anything is unclear, ask!
(Since you're using JavaScript, I'll assume that makes sense to you. If not, ask and I'll help further.) You can have a local .js file that has a function that injects the script using that method (e.g. a function named LoadMyScript). Then you can invoke it from your code with JS.LoadMyScript.
As I said, if anything is unclear, ask!