Just starting out? Need help? Post your questions and find answers here.
skinkairewalker
 
Posts: 43
Joined: Tue Jun 14, 2016 7:17 pm

how can i redirect to another page ?

by skinkairewalker Sat Oct 29, 2016 8:20 pm

hi everyone !
how can i redirect to another page in another server ?

example >
this is my page > mywebsite.com/index.html
so when i click in some button go to another page like google.com ?
falsam
 
Posts: 275
Joined: Mon May 05, 2014 9:49 pm
Location: France

Re: how can i redirect to another page ?

by falsam Sat Oct 29, 2016 9:38 pm

An example with the window.open () function.
Code: Select all
Declare RunProgram()

OpenWindow(0, 0, 0, 0, 0, "", #PB_Window_Background)
HyperLinkGadget(0, 10, 10, 100, 22, "http://google.com", RGB(46, 139, 87))

BindGadgetEvent(0, @RunProgram())

Procedure RunProgram()
  Protected link.s = GetGadgetText(EventGadget())
  ! window.open(v_link, "_self");
EndProcedure

➽ Windows 10 - JDK 1.8 - SB 2.20 - Android 5.5
http://falsam.com

Sorry for my poor english
skinkairewalker
 
Posts: 43
Joined: Tue Jun 14, 2016 7:17 pm

Re: how can i redirect to another page ?

by skinkairewalker Sat Oct 29, 2016 10:00 pm

Thanks you very much Falsam ^^
CONVERT
 
Posts: 7
Joined: Thu Aug 24, 2017 7:43 am

Re: how can i redirect to another page ?

by CONVERT Sun Sep 24, 2017 8:36 pm

Thank you so much, Falsam!

It works. I use "_blank" instead of "_self" to open in another tab.
SpiderBasic 2.10 x86 Full version, Windows 10 home 32.
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 7 guests