Search found 184 matches
- Thu May 27, 2021 4:47 pm
- Forum: Javascript
- Topic: What am I doing wrong when importing a JS script?
- Replies: 11
- Views: 13950
Re: What am I doing wrong when importing a JS script?
I have found how to import Metro UI. It's another library that detects define in the global namespace and it's that that interferes with LoadScript() so what I have done is temporarily hidden define until the imports are completed: Global nLoaded Global nImports = 2 Procedure Main() EnableJS var btn...
- Wed May 26, 2021 8:24 pm
- Forum: Coding Questions
- Topic: Spiderbasic invents query strings...?
- Replies: 6
- Views: 1526
Re: Spiderbasic invents query strings...?
I think you need to include the file extension in the URL. That worked for me with Apache, without the extension I got 404. Protected URL.s = "http://127.0.0.1:8080/cgi-bin/cgiprinter.exe" Sometimes you see a CGI's extension edited to be .cgi in order to keep the client side scripts platfo...
- Wed May 26, 2021 6:55 am
- Forum: Coding Questions
- Topic: Spiderbasic invents query strings...?
- Replies: 6
- Views: 1526
Re: Spiderbasic invents query strings...?
I doubt it's the query string, I think that just gets assigned to an environment variable that your CGI can access if required.
What do you get from:
What do you get from:
Code: Select all
Debug HTTPInfo(HTTPRequest, #PB_Http_ErrorMessage)
- Wed May 26, 2021 6:18 am
- Forum: Coding Questions
- Topic: Error: multipleDefine
- Replies: 12
- Views: 3061
Re: Error: multipleDefine
By default the SpiderBasic IDE will fix the case of SpiderBasic key words which can cause issues with JS code between EnableJS and DisableJS, as you've found here if gets changed to If.
You can turn off that behaviour in preferences: Editor -> Editing -> Enable Case Correction.
You can turn off that behaviour in preferences: Editor -> Editing -> Enable Case Correction.
- Tue May 25, 2021 8:41 pm
- Forum: Coding Questions
- Topic: Error: multipleDefine
- Replies: 12
- Views: 3061
Re: Error: multipleDefine
How about this? Procedure Main() Debug "All good!" ws = #Null EnableJS v_ws = new window.ReconnectingWebSocket(''); DisableJS EndProcedure Global nLoaded Global nImports = 2 Procedure RequireScript(url.s, objName.s) EnableJS require([v_url], function(obj) { window[v_objname] = obj; v_nload...
- Tue May 25, 2021 8:04 pm
- Forum: Coding Questions
- Topic: Error: multipleDefine
- Replies: 12
- Views: 3061
Re: Error: multipleDefine
(function (global, factory) { if (typeof define === 'function' && define.amd) { define([], factory); // <- this is the branch it takes } else if (typeof module !== 'undefined' && module.exports){ module.exports = factory(); } else { global.ReconnectingWebSocket = factory(); // <- I ...
- Tue May 25, 2021 4:26 pm
- Forum: Coding Questions
- Topic: Error: multipleDefine
- Replies: 12
- Views: 3061
Re: Error: multipleDefine
It looks like the problem might be that reconnecting-websocket detects that RequireJS has been loaded and so expects you to do something with that ... (function (global, factory) { if (typeof define === 'function' && define.amd) { define([], factory); // <- this is the branch it takes } else...
- Mon May 24, 2021 6:40 pm
- Forum: Coding Questions
- Topic: Error: multipleDefine
- Replies: 12
- Views: 3061
Re: Error: multipleDefine
Hi skinkairewalker, Is there a reason you're mixing together LoadScript() and require()? See if this works for you: Procedure Main() Debug "All good!" EndProcedure Procedure ExternalLoaded(URL$, Success) Static nLoaded If Success nLoaded + 1 If nLoaded = 2 ; the number of files to import M...
- Mon Apr 05, 2021 10:04 pm
- Forum: Coding Questions
- Topic: howto add parameter into callback ?
- Replies: 5
- Views: 1733
Re: howto add parameter into callback ?
Eng: This is not a good answer. Wrong path. Fr: Ce n'est pas une bonne réponse. Mauvais chemin. I'm guessing you don't like Peter's answer because you want to be able to match responses to requests so here's a slight variation (I'm not in a position to test at the moment but if I've slipped up you ...
- Mon Feb 22, 2021 10:31 am
- Forum: Showcase
- Topic: Use SQLite with SpiderBasic
- Replies: 17
- Views: 21092
Re: Use SQLite with SpiderBasic
The UseSQLiteDatabase() command doesn't exist in SpiderBasic but SQLite does work. Look at the example in the manual.Dirk Geppert wrote:But UseSQLiteDatabase() failed..