[Dojo-interest] FormBind Issues [summary]

_Pierre_ pieter.vanh at gmail.com
Thu Jan 18 04:14:15 MST 2007


Ok nevermind was mistake of me.
formbind works perfect with hidden fields and IE

_Pierre_ wrote:
> 
> Yeah Point 4) would explain my problem Any Fixes Workarounds ? Firefox
> works fine.
> 
> 
> ToddG wrote:
>> 
>> I've spent the week playing with dojo.io.formBind().  I've read the posts
>> on this thread and the Issues on Trac.
>> 
>> Here's some notes that may be helpful.
>> 
>> 1) formBind does not override the form.submit() function.  Invoking this
>> programmatically will cause the standard form submission process to
>> commence.  {I would prefer this not be the case, but apparently this is
>> by design}.  I've seen this hack posted by Yuriy which is useful for
>> correcting the issue:
>> <code>
>> var form = document.form[0];
>> form.oldSubmit = form.submit;  // Isn't really used anymore, but cache it
>> just in case.
>> form.submit = function()
>> {
>>   var fe = {};  
>>   fe.preventDefault = function(){};    
>>   form.onSubmit(fe);
>> }
>> </code>
>> 
>> 2) The  http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book23 Wiki
>> example  for proper usage is referred to frequently, especially in
>> reference to receiving the error "this.init is not a function".  What
>> causes this error is that the wiki example at one point in time was
>> missing the "New" operator (which was added to the Wiki example on 7/8).
>> 
>> 3) Either an <input type="submit"> or <input type="image"> element must
>> be present in the form for formBind to work.  Since one can't call
>> form.submit() [see item #1 above] directly, one must call this <input>'s
>> click() function instead.  I've hidden mine with style="display:none".
>> 
>> 4) Although I haven't personal experience yet, there appears to be
>> problems with <input type="hidden"> elements in a bound form with IE6.  I
>> haven't grokked the issue yet, but I've logged it in my mind for when I
>> eventually encounter a form with hidden fields.
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FormBind-Issues--summary--tf2927514.html#a8428896
Sent from the Dojo mailing list archive at Nabble.com.



More information about the Dojo-interest mailing list