hello,
I don't found how to quit the spider page. I want to close it or put a link to open an another page.
Cordially
Link or Close
Re: Link or Close
Code: Select all
Procedure ButtonEvent()
If MessageRequester("Really?", #PB_MessageRequester_YesNo) = #PB_MessageRequester_Yes
! window.close();
EndIf
EndProcedure
OpenWindow(0, 0, 0, 300, 200, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 10, 10, 280, 180, "Close window (current tab)")
BindGadgetEvent(0, @ButtonEvent())
Re: Link or Close
Thank, but this commande don't work on IPAD only on computer.
I correct : it works when you call the page from an another.
Cordially
I correct : it works when you call the page from an another.
Cordially
Re: Link or Close
Hello,
I found a simple solution. After creating the app, I add in the index.html a button to link an another site.
I found a simple solution. After creating the app, I add in the index.html a button to link an another site.
Re: Link or Close
Maybe you are looking for this procedure? (I think it also came from Peter)
Code: Select all
Procedure RunProgram(Filename.s, Parameter.s="")
! if (v_parameter != "") {
! var win = window.open(v_filename, v_parameter);
! win.focus();
! } else {
! window.open(v_filename);
! }
EndProcedure
Procedure CloseWindowEvent()
WindowID=EventWindow()
Select WindowID
Case 0
RunProgram("https://google.com","_parent")
CloseWindow(0)
EndSelect
EndProcedure
Procedure GadgetEvent()
GadgetID=EventGadget()
Select GadgetID
Case 1
RunProgram("https://spiderbasic.com")
EndSelect
EndProcedure
OpenWindow(0, 0, 0, 300, 200, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(1, 10, 10, 280, 180, "Visit SpiderBasic")
BindGadgetEvent(1, @GadgetEvent())
BindEvent(#PB_Event_CloseWindow,@CloseWindowEvent())
Re: Link or Close
Very interesting, I will test it . Thank
Re: Link or Close
So, the procedure works correctly. But, is it possible to find doc ob this.
what is a line beginning with !
Cordially
what is a line beginning with !
Cordially
Re: Link or Close
Lines beginning with ! are inline javascript, they are not native SpiderBasic commands.