javascript function is not a function
<p>This is the javascript code im using.</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
function cancelevent()
    {
     input_box=confirm("Are you sure you want to cancel?");
     if (input_box==true) {
      document.cancelevent.submit();
     } else {
     }

    }
&lt;/script&gt;
</code></pre>

<p>This is the form thats being submitted:</p>

<pre><code>&lt;form name=cancelevent method="post" action="whor.php"&gt;
&lt;input type="hidden" name="owner" value="owner"&gt;
&lt;a href="javascript:cancelevent()"&gt;Cancel&lt;/a&gt;
&lt;/form&gt;
</code></pre>

<p>I have this form on 2 different pages. One page it works, the other, i get this error</p>

<p>Error: document.cancelevent.submit is not a function</p>

<p>Ive literally copy and pasted the code from the working page to the 2nd page....no idea what is going on or why it would do this.</p>
