Changeset 6536
- Timestamp:
- 04/17/07 17:41:22 (1 year ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/src/form.js (modified) (1 diff)
- spinoffs/prototype/trunk/test/unit/form.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/trunk/CHANGELOG
r6534 r6536 1 1 *SVN* 2 3 * Fix Form.request for forms containing an input element with name="action". Closes #8063. [Thomas Fuchs, Mislav Marohnić] 4 5 * Make Event.element extend the returned element. Closes #7870. [Thomas Fuchs] 2 6 3 7 * Prevent a crash on Safari on String.prototype.stripScripts and extractScripts with large <script> tags. [Thomas Fuchs] spinoffs/prototype/trunk/src/form.js
r6474 r6536 94 94 options.method = form.method; 95 95 96 return new Ajax.Request(form. action, options);96 return new Ajax.Request(form.readAttribute('action'), options); 97 97 } 98 98 } spinoffs/prototype/trunk/test/unit/form.html
r6474 r6536 29 29 <input type="text" name="val2" id="input_disabled" disabled="disabled" value="5" /> 30 30 <input type="submit" /> 31 <input type="text" name="action" value="blah" /> 31 32 </form> 32 33 <div id="form_wrapper"> … … 311 312 // Checks that disabled element is not included in serialized form. 312 313 $('input_enabled').enable(); 313 assertEqual('val1=4 ', Form.serialize('form'));314 assertEqual('val1=4&action=blah', Form.serialize('form')); 314 315 315 316 // Checks that select-related serializations work just fine … … 367 368 request = $("form").request(); 368 369 assert($("form").hasAttribute("method")); 369 assert(request.url.endsWith("fixtures/empty.js?val1=4 "));370 assert(request.url.endsWith("fixtures/empty.js?val1=4&action=blah")); 370 371 assertEqual("get", request.method); 371 372 372 373 request = $("form").request({method: "post"}); 373 374 assert(request.url.endsWith("fixtures/empty.js")); 374 assertEqual("val1=4 ", Hash.toQueryString(request.options.parameters));375 assertEqual("val1=4&action=blah", Hash.toQueryString(request.options.parameters)); 375 376 assertEqual("post", request.method); 376 377 }},