Changes between Version 17 and Version 18 of AJAX/Dojo/RefactoredFormSubmit


Ignore:
Timestamp:
Feb 16, 2007, 8:02:04 AM (18 years ago)
Author:
erob@…
Comment:

added a note about IframeTransport for file-uploading support

Legend:

Unmodified
Added
Removed
Modified
  • AJAX/Dojo/RefactoredFormSubmit

    v17 v18  
    121121}}}
    122122
    123 Notice the absence of the {{{formNode}}} param for {{{postContent}}}, and the presence of {{{dojo.io.encodeForm}}} to parse/encode the form data into
    124 a proper format. That is all required for having the {{{XMLHTTPRequest}}}
    125 object handled by the Dojo toolkit.
    126 
    127 To connect the input submit button with the JS callback, use the following
    128 line:
    129 {{{
    130 #!text/html
    131 <input type="button" onclick="validate()" id="fooBtn"></input>
    132 }}}
     123Notice the absence of the {{{formNode}}} param for {{{postContent}}}, and the presence of {{{dojo.io.encodeForm}}} to parse/encode the form data into a proper format. That is more than sufficient for validating the
     124form with a {{{XMLHTTPTransport}}}. However, this approach doesn't work with file-uploads. To have file-uploads,
     125you could however change the {{{transport}}} line to {{{IframeTransport}}}. Here's a link to the [http://dojotoolkit.org/api/?#dojo.io.IframeTransport IframeTransport api].
    133126
    134127Have fun! That recipe should work in Firefox 2 and Opera 9.10.
     
    137130
    138131 * Usability issues: HTML 4.01 vs XHTML 1.0 strict vs No javascript
    139  * How to display other mimetype(s) when JSON is not used? 
     132 * XMLHTTPTransport doesnt support file-uploading. 
    140133
    141134=== Notes ===
     
    147140 * [http://cheeseshop.python.org/pypi/python-cjson/ python-cjson]
    148141 * [http://dojotoolkit.org/ Dojo, the Javascript Toolkit]
     142 * [http://dojotoolkit.org/api/ Dojo API Reference]
    149143 * [http://www.w3.org/TR/html401/ HTML 4.01 Specification]
    150144 * [http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference Core Javascript 1.5 Reference (mozilla)]
    151145 * [http://www.opera.com/docs/specs/opera9/js/ecma/ ECMAScript support in Opera 9]
    152146
    153  
     147=== Author ===
     148
     149Etienne Robillard <erob@cpan.org>
    154150
    155151
Back to Top