Open URL from button Dashcode

992 views Asked by At

I am sure that this is extremely easy and probably a one liner but I can't seem to find the answer anywhere.

I am creating a very simple web app in Dashcode (my first time) that has a button, when you press it, it needs to link to a url.

Cannot seem to find anything.

Thank you very much for your time.

4

There are 4 answers

0
random On BEST ANSWER

This ended up being what I needed:

document.location = ("http://www.google.com");
0
Stephen Middleton On

Try this... First add button event onclick (openURL) Then code follows...

function openURL()
{
  if ( window.widget )
  {
    widget.openURL( “http://www.google.com” );
    return false;
  }
}

Or Try...

{
 widget.openURL('http://www.google.com');
}
0
Anjan Biswas On

Try this too

function myButtonPressHandler(event)
{
  var websiteURL = "http://www.google.com";
  location = websiteURL;
}
0
SnowboardBruin On

I relied on Apple Developer for this:

function yourHandler(event) {
     widget.openURL("http://store.apple.com/");
}

enter image description here