Friday, 22 January 2010

"Object doesn't support this property or method" with theform.submit

In a recent post I described how easy it was to maintain scroll position for a user during a postback, by adding this to the page directive:
MaintainScrollPositionOnPostback="true"
This did cause me problem with one page where I implemented it. Only in Internet Explorer (other browsers seemed ok) did I get this javascript error:
Microsoft JScript runtime error: Object doesn't support this property or method
And it was referring "theform.submit"

It took me a while to resolve. I found that I had a user control on the page with a button that had the property name="submit". Removing this resolved the problem.

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!