PDA

View Full Version : Dashcode




Nicolasdec
Nov 10, 2007, 03:58 AM
what is the code for example, I want to have a button that when its pressed it opens safari and goes to google.com



Kaliemon
Nov 10, 2007, 08:19 AM
It is in the External Access part of the code library, but here it is if you can't find it. Just add it to a button's onclick event.

// Values you provide
var websiteURL = "http://www.google.com/"; // replace with the website URL to show

// Show website code
widget.openURL(websiteURL);

Nicolasdec
Nov 10, 2007, 09:12 AM
It is in the External Access part of the code library, but here it is if you can't find it. Just add it to a button's onclick event.

// Values you provide
var websiteURL = "http://www.google.com/"; // replace with the website URL to show

// Show website code
widget.openURL(websiteURL);

Thanks, worked like a charm :)