« Coming Soon | Main| FilteringSelect Pt 3. »

Dojo 1.1 and xhrPost

Category    
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 


Some time back I posted (http://dojomino.com/dojomino/blog.nsf/d6plinks/DBOS-79EJ34) about an issue with using xhrPost to submit forms to Domino.  The problem had to do with fields that were created by widgets that didn't have a "name" parameter.  This caused issues as Domino expects all fields to have a name.  I showed a solution that suggested editing the source code to prevent the non-named fields from being submitted.  Recently I updated the application I'm building to use the 1.1 release of Dojo.  I was headed in to make the update to correct for this problem when I noticed that the 1.1 source has been modified to correct for this and I no longer need to add my edit.

My solution to this problem had been to modify this line:
var iq = "input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button]), select, textarea";

to this
var iq = "input:not([type=file]):not([type=submit]):not([type=image]):not([type=reset]):not([type=button])[name], select, textarea";

This worked just fine.  The fix implemented by the Dojo team (as noted in this bug report http://trac.dojotoolkit.org/ticket/5793) was to change:
_d.query(iq, formNode).filter(function(node){
                        return (!node.disabled);

to
_d.query(iq, formNode).filter(function(node){
                        return !node.disabled && node.name;

So, there's a nice little change that saves us a little trouble.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)