I'm using a form that, during an onSubmit, calls a javascript that checks
whether a checkbox is selected or not. On a normal HTML page, this works
fine.

However, it doesn't work when the page is created by a template and the form
is being inserted into an editable region by using Insert HTML snippet in
Contribute. It's like it doesn't see the javascript at all.

I've added the javascript to both before the </head> and also as a .js file.

Any idea why the form doesn't see the javascript when inserted as an html
snippet? The code looks fine when doing a view source on that page.

Thanks!