XWidgetSoft Forum https://bbs.xwidget.com/ |
|
HELP: include script - possible? https://bbs.xwidget.com/viewtopic.php?f=8&t=3446 |
Page 1 of 1 |
Author: | yereverluvinuncleber [ August 3rd, 2013, 4:22 pm ] |
Post subject: | HELP: include script - possible? |
Is it possible to include any other file containing javascript code? include("vitality.js"); include("volume.js"); include("functions.js"); |
Author: | yereverluvinuncleber [ August 6th, 2013, 6:33 am ] |
Post subject: | Re: include script - possible |
It would be nice to get an answer to this one, so I am assuming this function does not exist and that I need to pull all the code into one file, script.js. If this is the case then I'd make it a feature request to 'include' this functionality. Each included script file would appear in a tab in the editor window. |
Author: | digigamer [ September 22nd, 2013, 11:04 pm ] |
Post subject: | Re: HELP: include script - possible? |
Possible but not as straightforward as you describe here. include() is not supported in MS Script Host. See MSDN for more details about that. However, it may be possible by adding the references to the script file in the widget xul (main.xul) file. The XUL file format allows that. Simply open up the file in a text editor and add your script file(s). Code: <script src="somefile.js"/> However, I've never tested this and this feature depends on the XWidget XUL parser. Hope it helps! ![]() |
Author: | Tony [ September 23rd, 2013, 4:10 am ] |
Post subject: | Re: include script - possible |
yereverluvinuncleber wrote: It would be nice to get an answer to this one, so I am assuming this function does not exist and that I need to pull all the code into one file, script.js. If this is the case then I'd make it a feature request to 'include' this functionality. Each included script file would appear in a tab in the editor window. Hi, you can check this TODOList widget, it's script add two js files: http://www.xwidget.com/xwidget/widgets/ ... 2/421.html put this code at first line of script: Code: eval(readFile(WidgetPath + "other_script.js"));
|
Author: | yereverluvinuncleber [ September 23rd, 2013, 11:48 am ] |
Post subject: | Re: HELP: include script - possible? |
Thanks ever so - it will really simplify some of my code to allow .js inclusion - will give it a try and let you know how I get on. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |