Confirm box doesnt work when i get a value from a form php and javascript
<p>This seems really odd to me, but my popup confirm box will work when i just call the function, but as soon as i try to get a value from a form in my php code, the popup box doesnt work at all! </p>

<p>javascipt:</p>

<pre><code>function ConfirmBox(){
    cert = cValForm.elements["cVal"].value;
    answer = confirm("Are you sure you want to delete " + cert + " and all of its courses?");
     if (answer){
         alert("Entry Deleted");
     }
     else{
         alert("No action taken");
     }             
}
</code></pre>

<p>PHP:</p>

<pre><code>echo "&lt;form name='cValForm'&gt;";
echo "&lt;input type='hidden' name='cVal' value='TEST' /&gt; ";
echo "&lt;input type='button' onclick='ConfirmBox()' value='Delete'/&gt;";
echo "&lt;/form&gt;";
</code></pre>

<p>As soon as i comment out the line:</p>

<pre><code>cert = cValForm.elements["cVal"].value;
</code></pre>

<p>As well as getting rid of the cert value in the string, the popup works completely fine.  Am i getting the value from the form wrong? Or am i completely missing something here? Thanks!</p>
