Inline JS function call issue

Just starting out? Need help? Post your questions and find answers here.
bbanelli
Posts: 107
Joined: Mon Jul 13, 2015 7:40 am

Inline JS function call issue

Post by bbanelli »

Code: Select all

Procedure MyProcedure()
  Debug "Hello world"
EndProcedure

; Call in SpiderBasic
; MyProcedure()
; Call using Javascript
!f_myprocedure();

Code: Select all

Uncaught ReferenceError: f_myprocedure is not defined(…)
However, if you uncomment MyProcedure() it works (function is called both times).
"If you lie to the compiler, it will get its revenge."
Henry Spencer
http://www.pci-z.com/
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: [SB 2.00 b6] Inline JS function call issue

Post by Peter »

bbanelli
Posts: 107
Joined: Mon Jul 13, 2015 7:40 am

Re: Inline JS function call issue

Post by bbanelli »

Hi Peter, thanks for the heads up.

BTW, you proposed Declare as solution or that is a solution? Since I don't seem to be able to utilize it...
"If you lie to the compiler, it will get its revenge."
Henry Spencer
http://www.pci-z.com/
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: Inline JS function call issue

Post by Peter »

Hello bbanelli,
bbanelli wrote:BTW, you proposed Declare as solution or that is a solution?
at the moment 'Declare' is a dummy-function in SpiderBasic, so i think, it's a good idea to declaring JS-Functions with it.

Greetings ... Peter
Post Reply