Using Javascript from SpiderBasic
menschmarkus
 
Posts: 34
Joined: Thu Apr 10, 2014 3:35 pm

Need help with Cursor style

by menschmarkus Sun Jun 14, 2020 1:38 pm

Hi,

sorry but SB and JS is new field for me.
Is it possible to change cursor style to
Code: Select all
! cursor:progress;
; alternatively
! cursor: wait;
while a SB procedure is running and set it back to
Code: Select all
! cursor:default;
after the procedure is done!
I tried these commands within SB code but it did not work.
Code: Select all
...
! cursor: progress;
do_something()
! cursor: default;

I hope not annoying you with my questions :?
as soon you do it right, it works !
User avatar
Peter
 
Posts: 774
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080

Re: Need help with Cursor style

by Peter Sun Jun 14, 2020 2:27 pm

you can use:
Code: Select all
! $("body").css("cursor", "progress");

and:
Code: Select all
! $("body").css("cursor", "default");
menschmarkus
 
Posts: 34
Joined: Thu Apr 10, 2014 3:35 pm

Re: Need help with Cursor style

by menschmarkus Sun Jun 14, 2020 2:54 pm

Peter, thank you for your quick response. This is working fine.

Again my question. Is there any instruction how to implement JS in SB ?
In your last link ([url]developer.mozilla.org[/url]) I find general information for JS. Similar information in http://www.w3schools.com. However in there you will not find information how to implement JS code in SB.
Some Samples would be helpful like the ones I asked. Of course it is not possible to write a complete manual for JS in SB but I can imagin there are basic situations which may occure more often can be described here.
Propably just a selection of already done posts for implementing JS in SB would make it easier for everyone to find possible solution.

Thank you again, Peter, for your effort to help in this Forum.
as soon you do it right, it works !
bbanelli
 
Posts: 106
Joined: Mon Jul 13, 2015 7:40 am

Re: Need help with Cursor style

by bbanelli Sun Jun 14, 2020 3:01 pm

menschmarkus wrote:Again my question. Is there any instruction how to implement JS in SB ?
All along, it was in a place no one would ever search...

https://www.spiderbasic.com/documentati ... nedjs.html
"If you lie to the compiler, it will get its revenge."
Henry Spencer
http://www.pci-z.com/
menschmarkus
 
Posts: 34
Joined: Thu Apr 10, 2014 3:35 pm

Re: Need help with Cursor style

by menschmarkus Sun Jun 14, 2020 7:46 pm

Thank you bbanelli, that was really hidden.
as soon you do it right, it works !
Return to Javascript

Who is online

Users browsing this forum: No registered users and 2 guests