Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wonder-514 AjaxSubmitButton doesn't work when ERXWOForm.useIdInsteadOfNameTag = true #96

Open
nullterminated opened this issue Dec 27, 2011 · 1 comment

Comments

@nullterminated
Copy link
Member

AjaxSubmitButton references the form element by name. This doesn't work when using ERXWOForm.useIdInsteadOfNameTag = true because the name is converted to id instead. This should probably just be a matter of changing line 153 of ASB to something like the following:

formReference = "document." + (ERXWOForm.useIdInsteadOfNameTag?"getElementById(" + formName + ")":formName);

@rgurley
Copy link

rgurley commented Aug 3, 2016

Facepalm

Just hit this again, years later. The correct answer seems to be

formReference = "document.forms['" + formName +"']";

Don't miss the single quotes around formName. That works in both cases on Firefox. I assume it works the same on other browsers. Since the current behavior is to just append formName, a workaround is to set the formName to forms['the_form_name'] on the ASB form name binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants