Simple Javascript Help Request
<p>I'm after a little help with some JS not behaving.  I would like to make it so that I can pass an some JavaScript to affect the end URL destination as below: The end destination being (<code>delete-page.php?id=1</code>)</p>

<pre><code>&lt;a href ="javascript:deletemessage('id=1')"&gt;Delete Page &lt;/a&gt;

&lt;script type="text/javascript"&gt;
function deletemessage(url) {
  $.msgbox("Are you Sure you would like to delete this page", {
    type: "confirm",
    buttons: [{
      type: "submit",
      value: "No"
    }, {
      type: "submit",
      value: "Yes"
    }]
  }, function(result) {
    if (result == "Yes") {
      window.location.href = "delete-page.php(URL)";
    }
  });
}
&lt;/script&gt;
</code></pre>

<p>Any help would be very much appreciated!</p>
