Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 10, 2007, 03:58 AM   #1
Nicolasdec
macrumors 65816
 
Nicolasdec's Avatar
 
Join Date: Dec 2006
Location: London, UK
Dashcode

what is the code for example, I want to have a button that when its pressed it opens safari and goes to google.com
__________________
Macbook Pro 2.53GHz 4GB, 2.8GHz 4GB iMac
Canon 5D II, 24-105 L f/4, 70-300 DO f/4.5-5.6, 180 F/3.5 L, Lensbaby Composer.
Flickr
Nicolasdec is offline   0 Reply With Quote
Old Nov 10, 2007, 08:19 AM   #2
Kaliemon
macrumors member
 
Join Date: Apr 2006
Send a message via AIM to Kaliemon
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);
Kaliemon is offline   0 Reply With Quote
Old Nov 10, 2007, 09:12 AM   #3
Nicolasdec
Thread Starter
macrumors 65816
 
Nicolasdec's Avatar
 
Join Date: Dec 2006
Location: London, UK
Quote:
Originally Posted by Kaliemon View Post
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
__________________
Macbook Pro 2.53GHz 4GB, 2.8GHz 4GB iMac
Canon 5D II, 24-105 L f/4, 70-300 DO f/4.5-5.6, 180 F/3.5 L, Lensbaby Composer.
Flickr
Nicolasdec is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Dashcode on Mavericks iJC-1976 OS X Mavericks (10.9) 6 Mar 8, 2014 11:33 AM
dashcode help fracksoup Mac Programming 1 Nov 15, 2013 12:10 PM
How to get Dashcode bb13 Mac Programming 3 Aug 4, 2013 10:39 AM
Downloading Dashcode sh0vel Mac Programming 4 Apr 30, 2013 09:14 AM
Dashcode on ML? mathcolo Mac Programming 1 Aug 15, 2012 04:56 PM

Forum Jump

All times are GMT -5. The time now is 01:10 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC