Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Nicolasdec

macrumors 65816
Original poster
Dec 7, 2006
1,168
0
São Paulo
what is the code for example, I want to have a button that when its pressed it opens safari and goes to google.com
 
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);
 
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 :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.