I have only been playing with HTML/JS for a couple of days.

Please can someone tell me why the following statements do not work.

HTML Code:

    <title>My Website Page 2</title>
    <script type="text/javascript">
    function sendalert(x)        
    if (x=="Dave")
    document.write("Yourname is Dave");
    document.write("You're not Dave");

    <input type=text name="text" value="NAME">
        <input type=button value="click Me" name="send" onclick="sendalert(form.text.value)">



Last edited by shabbir; 12May2009 at 09:24.. Reason: Code blocks