My Asp masterpage has this code:
<script>
    if (theForm !== undefined) { // <<== line 746: error
        theForm.onsubmit = ...bla bla... ;
    }
</script>
The Chrome console reports the error:
Uncaught ReferenceError: theForm is not defined   bla.aspx:746
My question is: is this a wrong way of detecting if a name is undefined? Or is this handled differently by Chrome?
(NB: Firefox console does not report an error, but still stops processing following JS code of this script block)
 
     
    