has anyone ran into this before?

The id and name had a capital letter. “submitButton “submitButton

<input id="submitButton" name=" submitButton " value="ok" 
type="button" title="submit" onclick="submitButton();" />

For some reason I would see the following js error: object doesn't support this property or method. When I clicked the button.

When I changed the id and name to all lowercase "submitbutton" everything works fine.

Recommended Answers

All 3 Replies

Probably due to having elements, JavaScript functions, etc. all with the same name. That's just a guess.

Good stuff.

"Internet Explorer incorrectly adds all name's (and maybe id's) of objects as global variables. So when you say submitButton(), it thinks you're trying to call the <input> tag itself as a function. Renaming the tag (javascript is case sensitive) prevented this.

This is Internet Explorer's fault, because submitButton shouldn't be a global variable." (Slime)

Good guess. Where did you get that little piece of information? Please post the link for the benefit of future readers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.