/[webpac2]/trunk/web/iwf/iwfajax.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/web/iwf/iwfajax.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 56 by dpavlin, Tue Nov 15 14:29:59 2005 UTC revision 69 by dpavlin, Sat Nov 19 23:48:19 2005 UTC
# Line 275  function _iwfGetFormData(form, url, ctl) Line 275  function _iwfGetFormData(form, url, ctl)
275                                  case 'input':                                  case 'input':
276                                          switch(iwfAttribute(el, 'type')){                                          switch(iwfAttribute(el, 'type')){
277                                                  case 'checkbox':                                                  case 'checkbox':
278                                                            if (iwfAttribute(el, 'checked')){
279                                                                    val = 'on';
280                                                            }
281                                                  case 'radio':                                                  case 'radio':
282                                                          if (iwfAttribute(el, 'checked') || el.checked){                                                          if (iwfAttribute(el, 'checked')){
283                                                                  val = iwfAttribute(el, 'value') || el.value;                                                                  val = iwfAttribute(el, 'value');
284                                                          }                                                          }
285                                                          break;                                                          break;
286                                                  case 'button':                                                  case 'button':
# Line 458  function _iwfInsertHtml(html, parentNode Line 461  function _iwfInsertHtml(html, parentNode
461                          // our html to inject contains a form node.                          // our html to inject contains a form node.
462                          // bubble up the chain until we find a <form> node, or we have no parents                          // bubble up the chain until we find a <form> node, or we have no parents
463                          var elParent = el;                          var elParent = el;
464                          while (elParent && elParent.tagName.toLowerCase() != 'form'){                          // I have doubts about adding elParent.tagName here
465                            // but I don't have better idea. -dpavlin
466                            while (elParent && elParent.tagName && elParent.tagName.toLowerCase() != 'form'){
467                                  elParent = iwfGetParent(elParent);                                  elParent = iwfGetParent(elParent);
468                          }                          }
469    
470                          if (elParent && elParent.tagName.toLowerCase() == 'form'){                          if (elParent && elParent.tagName && elParent.tagName.toLowerCase() == 'form'){
471                                  iwfLog('IWF Ajax Error: Attempting to inject html which contains a <form> node into a target element which is itself a <form> node, or is already contained by a <form> node.\nThis is bad html, and will not work appropriately on some major browsers.', true);                                  iwfLog('IWF Ajax Error: Attempting to inject html which contains a <form> node into a target element which is itself a <form> node, or is already contained by a <form> node.\nThis is bad html, and will not work appropriately on some major browsers.', true);
472                          }                          }
473                  }                  }

Legend:
Removed from v.56  
changed lines
  Added in v.69

  ViewVC Help
Powered by ViewVC 1.1.26