Own SetActiveGadget()

Using Javascript from SpiderBasic
Stefan
Posts: 127
Joined: Mon Feb 05, 2018 9:44 pm

Own SetActiveGadget()

Post by Stefan »

I'm currently trying to create my own Setactivegadget() because Spider's doesn't work properly.
Unfortunately I don't know any Javascript and I can't really get any further.
With the code below, Spider hangs.

Can someone help?

Code: Select all

Procedure SetActiveGadget1(gadget)
Protected id.s

 ! var GadgetElement = $(spider_GadgetID(v_gadget).div);
  ! if (GadgetElement.attr("id")) {
  !   v_id = GadgetElement.attr("id");
  ! } else {
  !   GadgetElement.attr("id", "SB_Gadget_" + v_gadget);
  !   v_id = GadgetElement.attr("id");
  ! }
  
  
  
  !  var obj = document.getElementById (id);
  !          If (obj.setActive) {
   !             obj.setActive ();
   !         }
     
    
   
EndProcedure
Fred
Site Admin
Posts: 1433
Joined: Mon Feb 24, 2014 10:51 am

Re: Own SetActiveGadget()

Post by Fred »

It's fixed in the new beta.
Post Reply