Page 1 of 2

webgadget

Posted: Mon Oct 05, 2020 4:19 pm
by William Van Hoecke
Hello,
Does Anyone have any id why next code does not write anything in the debug window.

Code: Select all

  If OpenWindow(10, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If WebGadget(20, 10, 10, 580, 280, "https://www.spiderbasic.com")
      Debug "ok"
    Else   
      Debug "not ok"
    EndIf  
  EndIf

Re: webgadget

Posted: Mon Oct 05, 2020 8:09 pm
by plouf
here it says "ok"

Re: webgadget

Posted: Mon Oct 05, 2020 9:15 pm
by Peter
plouf wrote:here it says "ok"
same here.

@William: Which browser do you use with which OS?

Re: webgadget

Posted: Tue Oct 06, 2020 11:09 am
by William Van Hoecke
Windows 10, same effect both on chrome and edge (same enigin I understand)
Weared thing, I wrote a much more complex program where the webgadget works fine (and still does).

But this simpel 3line prog doesn't.
It says neither 'ok' nor 'not ok', any line after the webgadget does not get executed.

Don't know too much about javascript but de broser-debug says

Code: Select all

dojo.js:305 TypeError: e.indexOf is not a function
    at k.fn.init.k.fn.load (jquery.min.js:2)
    at window.spider_WebGadget (webtest.js:266)
    at SpiderLaunch (webtest.js:275)
    at SpiderMain (main.js:24)
    at webtest.js:172
    at fa (dojo.js:19)
    at dojo.js:20
    at ga (dojo.js:20)
    at da (dojo.js:20)
    at c (dojo.js:21) "TypeError: e.indexOf is not a function
    at k.fn.init.k.fn.load (https://www.electrodraw.be/conceptfaktuur/spiderbasic/jquery.min.js:2:83689)
    at window.spider_WebGadget (https://www.electrodraw.be/conceptfaktuur/webtest.js:266:440)
    at SpiderLaunch (https://www.electrodraw.be/conceptfaktuur/webtest.js:275:5)

Re: webgadget

Posted: Tue Oct 06, 2020 12:16 pm
by William Van Hoecke
OK...
Just found out that the weared behaviour was due to one of the .js files (probably jquery.min.js) in the spiderbasic directory. It was all different from the original one. Restored it and all works fine again.

Thanks all

Re: webgadget

Posted: Tue Oct 27, 2020 2:05 am
by William Van Hoecke
Hello
I found out that the spiderbasic webgadget is not working with the latest jquery.min.js contained in V2.30 and V2.31

it still works with
jquery.min.js version /*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */

it does produce an error with
jquery.min.js version /*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */

following code does not produce anything in the debug window, and produces an js error in the browser debugger

Code: Select all

If OpenWindow(10, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    If WebGadget(20, 10, 10, 580, 280, "https://www.spiderbasic.com")
      Debug "ok"
    Else   
      Debug "not ok"
    EndIf 
  EndIf 
browser error is

Code: Select all

dojo.js:305 TypeError: e.indexOf is not a function
    at k.fn.init.k.fn.load (jquery.min.js:2)
   .....
   .....
Anybody knows what the problem is here ???

Re: webgadget

Posted: Sun Nov 28, 2021 3:41 am
by Musikus
Hello,
same here...
I also had to replace the "jquery.min.js " in the spiderbasic directory with the old version:
query.min.js version /*! jQuery v2.1.4
now the "WebGadget" is working...

I have SpiderBasic 2.30 (Windows - x86) installed...

I tried also with the newest version of query.min.js 3.6.0 -. but WebGadget is not working with 3.6.0...

Is there a better solution?

Are there any (unwanted) "side-effetcs" if I use jQuery v2.1.4 ?

Thanks!

Re: webgadget

Posted: Sun Nov 28, 2021 6:03 am
by Paul
Musikus wrote: Sun Nov 28, 2021 3:41 am I have SpiderBasic 2.30 (Windows - x86) installed...

Is there a better solution?
Works fine here using SpiderBasic 2.31

Re: webgadget

Posted: Mon Nov 29, 2021 4:35 am
by Musikus
Hallo Paul,
Thank you for your answer.
What version of query.min.js is installed with your SpiderBasic 2.31?
I mean the query.min.js in the folder: \SpiderBasic\Libraries\javascript\
Thank you!

Re: webgadget

Posted: Mon Nov 29, 2021 5:05 am
by Paul
Musikus wrote: Mon Nov 29, 2021 4:35 am What version of query.min.js is installed with your SpiderBasic 2.31?
I mean the query.min.js in the folder: \SpiderBasic\Libraries\javascript\
Thank you!
/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */