I am writing a semi-generic form plugin using jQuery to speed up the development of the project I'm working on.
The plan is that the jTemplates template contains fields, my plugin looks at the template to find any required multilingual resources, requests them from the server and then packs everything into a JavaScript object, which is then passed to the user function on "submit".
Everything works well, except for the standard โwhen input is entered, enter the form codeโ, which you need to do when you pretend to be in the form:
opts.coreElement.find('input[type=text]').keypress(function(evt) {
if ((evt.keyCode || evt.which) == 13) {
opts.coreElement.find('.saveButton').click();
}
});
The problem is that in Firefox (at least I have not tested other browsers yet), if you previously entered information in a text field with the same name, you get your form history. If you then select one of the suggested values โโby pressing enter, it will submit the form. Not very good if you are on the first entry on the page. This is actually quite annoying.
jQuery. , , ASP.NET MVC, , ? , , ? , WebForms ASP.NET, "" ?
, , , ?