- Create a simple APEX page with an HTML region
- Create 2 buttons that submit the page with a request e.g. SUBMIT and CANCEL
- Run the page
So far, it works - if you press either button you can see that the page is being submitted.
Now edit the buttons and assign them static IDs of "submit" and "cancel" respectively. Run the page again - the buttons no longer work! If you check for Javascript errors you will see that you are getting "Uncaught TypeError: object is not a function" (in Chrome) or similar.
Apparently this is a known issue with jQuery (see http://bugs.jquery.com/ticket/1414):
Forms and their child elements should not use input names or ids that conflict with properties of a form, such as submit, length, or method. Name conflicts can cause confusing failures. For a complete list of rules and to check your markup for these problems, see DOMLint.
No comments:
Post a Comment