1) Open aXes development environment
2) Load your project in TS2 and navigate to the screen you wish to customise
Click on "Work as a TS2 Developer"
Signon to your session
Type on the command line: "addlible axesdemo" followed by enter
Type on the command line: "call xhrrpgtrn" followed by enter
Put an X next to to an employee
If you don't have a screen definition, press suggest and save the screen.
3) Add a PushButton
4) Edit caption. Change the caption value to "Take me there"
5) Click on the tab "screens"
Please note: This script uses the values of the fields Street, City, State, Country and these names need to be defined in the screens tab of TS2 development environment for the relevant fields.
Change the fields' names to:
Street
City
State
Zip
Country
6) Edit script
Copy and paste the script hereunder in the edit box.
Code: Select all
if (window.LRSV)
{
var callBackFunction = function(result)
{
var url = "http://www.google.com/maps/dir/" +
result.userInfo.LATITUDE + "," +
result.userInfo.LONGITUDE + "/+" +
FIELDS("Street").getValue().replace(" ","+") + ",+" +
FIELDS("City").getValue().replace(" ","+") + ",+" +
FIELDS("State").getValue().replace(" ","+") + ",+" +
FIELDS("Country").getValue().replace(" ","+");
window.open( url );
};
var options =
{
callBack : callBackFunction
};
LRSV.getGeolocation( options );
}
8) open aXes mobile and run your demonstration