-
24 Nov 2009 12:57 AM #1
[CLOSED][3.??] Ajax Form Submit is not encoding single/multi-select values
[CLOSED][3.??] Ajax Form Submit is not encoding single/multi-select values
I have a form with a single select,
where the display value is "AND" and the internal value is "&&".
on submitting the form, the single select value is not encoded and hence the encoded string appears as
which is resulting in an error in the runtime.Code:paramName1=&&¶mName2=someval
This section of code in serializeForm method has an issue:
I modified the code locally to address the issue. But is this a known issue or is there any other way to address this apart from fixing the code directly.Code:if(/select-(one|multiple)/i.test(type)){ Ext.each(element.options, function(opt) { if (opt.selected) { data += String.format("{0}={1}&", encoder(name), (opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttributeNode('value').specified) ? opt.value : opt.text); } });
Modified Code:
Code:if(/select-(one|multiple)/i.test(type)){ Ext.each(element.options, function(opt) { if (opt.selected) { data += String.format("{0}={1}&", encoder(name), (opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttributeNode('value').specified) ? encoder(opt.value) : encoder(opt.text)); } });Last edited by mystix; 24 Nov 2009 at 1:02 AM. Reason: POST CODE IN [code][/code] TAGS. see http://extjs.com/forum/misc.php?do=bbcode#code
-
24 Nov 2009 2:24 AM #2
This is already corrected in SVN, marking as closed.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote