Вопрос

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

This ended up being what I needed:

document.location = ("http://www.google.com");

Другие советы

I relied on Apple Developer for this:

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

enter image description here

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');
}

Try this too

function myButtonPressHandler(event)
{
  var websiteURL = "http://www.google.com";
  location = websiteURL;
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top