Changeset 12261
- Timestamp:
- 02/02/08 22:19:36 (11 months ago)
- Location:
- dijit/trunk
- Files:
-
- 2 modified
-
form/Form.js (modified) (3 diffs)
-
tests/form/Form.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/form/Form.js
r12183 r12261 251 251 action: "", 252 252 method: "", 253 enc type: "multipart/form-data",253 encType: "", 254 254 "accept-charset": "", 255 255 accept: "", … … 259 259 260 260 attributeMap: dojo.mixin(dojo.clone(dijit._Widget.prototype.attributeMap), 261 {onSubmit: "", action: "", method: "", enc type: "", "accept-charset": "", accept: "", target: ""}),261 {onSubmit: "", action: "", method: "", encType: "", "accept-charset": "", accept: "", target: ""}), 262 262 263 263 // execute: Function … … 268 268 // Deprecated: use onSubmit 269 269 onExecute: function(){}, 270 271 postCreate: function(){ 272 // IE tries to hide encType 273 if(dojo.isIE && this.srcNodeRef && this.srcNodeRef.attributes){ 274 var item = this.srcNodeRef.attributes.getNamedItem('encType'); 275 if(item && (typeof item.value == "string")){ 276 this.setAttribute('encType', item.value); 277 this.domNode.encoding = item.value; 278 } 279 } 280 this.inherited(arguments); 281 }, 270 282 271 283 // TODO: remove ths function beginning with 2.0 -
dijit/trunk/tests/form/Form.html
r12232 r12261 107 107 <div style="color:red">Currently only widgets are supported, not raw elements.</div> 108 108 <!-- to test form submission, you'll need to create an action handler similar to 109 http://www.utexas.edu/teamweb/cgi-bin/generic.cgi --> 110 <form dojoType="dijit.form.Form" id="myForm" onsubmit="alert('Attempting to submit form w/values:\n'+dojo.toJson(this.getValues(),true));if(this.isValid()){return confirm('Form is valid, press OK to submit');}else{alert('Form contains invalid data. Please correct first');return false;}"> 109 http://www.utexas.edu/teamweb/cgi-bin/generic.cgi 110 http://www.tipjar.com/cgi-bin/test --> 111 <form dojoType="dijit.form.Form" id="myForm" encType="multipart/form-data" action="" method="" onsubmit="alert('Attempting to submit form w/values:\n'+dojo.toJson(this.getValues(),true));if(this.isValid()){return confirm('Form is valid, press OK to submit');}else{alert('Form contains invalid data. Please correct first');return false;}"> 111 112 <p>Just HTML text</p> 112 113 <table border=2> … … 259 260 </tr> 260 261 262 <tr> 263 <td>File upload</td><td>filename</td> 264 <td> 265 <input dojoType="dijit.form.TextBox" name="filename" type="file"> 266 </td> 267 </tr> 261 268 </table> 262 269