I was creating a form validator for a client and ran into this weird error only in Internet Explorer (Explorer) 7/8....
\'return\' outside of fu
The problem was that I was using a return statement to override the default behavior for my form and it was assigned to a property, but it was not placed inside an anonymous function!
I had a form element that was set up like this:
All I needed to change was the action property to this:
… action="javascript:function(){return false};"
It now works flawlessly!