treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Does this javascript look right?


  • function show_confirm()
    {
    if (##OrderTotalGrand2## > 15.00)
      {
      alert("You pressed OK!");
      }
    else if (document.msswe.Agree.checked)
    {
    document.msswe.submit();return false;
    }
    else if
    {
    alert('We cannot accept requests unless the Duraco Inc. conditions of sales have been read and agreed to.');return false;
    }
  • I actually go it working. I was missing a }. But after the prompt box comes up and you hit okay it re-loads the page? Can I get it not to reload?