Location: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
== Description == | == Description == | ||
Location lets you get or set the name of the current app. It will return the URL of the current app that you are running. If you want to run another app, assign the URL of that app to Location. In this respect, it works similarly to the Chain statement found in some other implementations of BASIC. | Location lets you get or set the name of the current app. It will return the URL of the current app that you are running. If you want to run another app or go to a web page, assign the URL of that app to Location. In this respect, it works similarly to the Chain statement found in some other implementations of BASIC. | ||
To send parameters to the next app, put a question mark (?) followed by the string after the new app name. | To send parameters to the next app, put a question mark (?) followed by the string after the new app name. |
Revision as of 13:57, 11 September 2014
Location[(string | variable)]
Description
Location lets you get or set the name of the current app. It will return the URL of the current app that you are running. If you want to run another app or go to a web page, assign the URL of that app to Location. In this respect, it works similarly to the Chain statement found in some other implementations of BASIC.
To send parameters to the next app, put a question mark (?) followed by the string after the new app name.
Example
Rem Location Example MsgBox "The name of this app is " & location MsgBox "Going to http://www.nsbasic.com/Project1/index.html?someParameters" location = "http://www.nsbasic.com/Project1/index.html?someParameters" … Rem PROJECT1 MsgBox "Started with parameter " & location.search
Send your own query string (instead of Form Submit())
location="http://someurl.com/index.html?parameter1=one¶meter2=two"
Output
?someParameters