W3Schools tutorial example not working with Coda on Mac

Posted by Mark Szymanski on Stack Overflow See other posts from Stack Overflow or by Mark Szymanski
Published on 2010-05-05T00:06:34Z Indexed on 2010/05/05 0:18 UTC
Read the original article Hit count: 456

Filed under:

I am following a JavaScript tutorial on the W3Schools website and I have the following code:






<script type="text/javascript">
function confirmShow
    var r = confirm("Press one...")
    if (r == true)
        alert("Button pressed == OK")

    if (r == false)
        alert("Button pressed == Cancel")
<input type="button" onclick="confirmShow()" value="Show Confirm Box" />


and whenever I preview it in Coda or in Safari the alert never shows up.

Thanks in advance!

© Stack Overflow or respective owner

Related posts about w3schools

Related posts about JavaScript