i want to transfer a variable to a new web page when I press a hyperlink. I can find ways to do this using PHP but nothing otherwise. I have tried two methods that dont work and am looking for help.
1. This should pass the loc varialble with the link
<a href="location_display.htm?loc=1" >View Location 1 Details --></a><br>
<a href="location_display.htm?loc=2" >View Location 2 Details --></a><br>
Using this method I cannot find a way to retrieve the varialble 'loc' on the new page. Any suggestions?
2. This should save the loc variable and allow it to be retrieved from the new page
<a href="location_display.htm" onClick=<!--VARIABLE SetLocation(fd,1)>View Location 1 Details --></a><br>
<a href="location_display.htm" onClick=<!--VARIABLE SetLocation(fd,2)>View Location 2 Details --></a><br>
This stops the hyperlink from being displayed. Any suggestions why this does not work (clearly the onClick is not valid in this context)?
Any other suggestions?
Thanks
Lachlan
Transfering a varialble with a hyperlink for Netburner
Re: Transfering a varialble with a hyperlink for Netburner
To do this, you will need to define a custom GET handler on the netburner. You will want to take the url string and locate the '?' character and parse the trailer for your variables. Take a look at the TicTacToe example in the Web directory for the gist of this.
-Dan
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: Transfering a varialble with a hyperlink for Netburner
Thanks, This works fine.
Lachlan
Lachlan