TIP: Opening Web Pages

(1) You can open up a web page using “application.showURL().” A typical example would be:

application.showURL(‘http://www.mapquest.com’);

(2) You can display a map of my address – 8120 Woodmont Avenue, Bethesda, MD:

application.showURL(‘15421 Old State Rd, Middlefield, Ohio - MapQuest’);

(3) You can use Servoy record information to build your string dynamically so that you can display a map for each record:

//build connection string
var connection_string =
Official MapQuest - Maps, Driving Directions, Live Traffic’ +
‘country=’ + escape(field_country) +
‘&address=’ + escape(field_address) +
‘&city=’ + escape(field_city) +
‘&state=’ + escape(field_state) +
‘&submit=Get%20Map’

//send string to default browser
application.showURL(connection_string);

The TIP here is to use the javascript function “escape()” to ASCII encode the string before sending it to the browser. For example, instead of sending “&address=8120 Woodmont” (which would fail) this portion of the string would have the space encoded to send “&address=8120%20Woodmont”.

  • david

cool stuff 8)