webgadget

Just starting out? Need help? Post your questions and find answers here.
User avatar
William Van Hoecke
Posts: 50
Joined: Tue Oct 22, 2019 12:09 pm

webgadget

Post 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
plouf
Posts: 194
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: webgadget

Post by plouf »

here it says "ok"
Christos
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: webgadget

Post by Peter »

plouf wrote:here it says "ok"
same here.

@William: Which browser do you use with which OS?
User avatar
William Van Hoecke
Posts: 50
Joined: Tue Oct 22, 2019 12:09 pm

Re: webgadget

Post 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)
User avatar
William Van Hoecke
Posts: 50
Joined: Tue Oct 22, 2019 12:09 pm

Re: webgadget

Post 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
User avatar
William Van Hoecke
Posts: 50
Joined: Tue Oct 22, 2019 12:09 pm

Re: webgadget

Post 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 ???
Musikus
Posts: 6
Joined: Thu Nov 11, 2021 3:06 am

Re: webgadget

Post 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!
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: webgadget

Post 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
Musikus
Posts: 6
Joined: Thu Nov 11, 2021 3:06 am

Re: webgadget

Post 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!
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: webgadget

Post 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 */
Post Reply