Dashcode

Discussion in 'Mac Programming' started by Nicolasdec, Nov 10, 2007.

  1. macrumors 65816

    Nicolasdec

    Joined:
    Dec 7, 2006
    Location:
    São Paulo
    #1
    what is the code for example, I want to have a button that when its pressed it opens safari and goes to google.com
     
  2. macrumors member

    Joined:
    Apr 30, 2006
    #2
    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);
     
  3. thread starter macrumors 65816

    Nicolasdec

    Joined:
    Dec 7, 2006
    Location:
    São Paulo
    #3
    Thanks, worked like a charm :)
     

Share This Page