switch(iwfAttribute(el, 'type')){\r
case 'checkbox':\r
case 'radio':\r
- if (iwfAttribute(el, 'checked')){\r
- val = iwfAttribute(el, 'value');\r
+ if (iwfAttribute(el, 'checked') || el.checked){\r
+ val = iwfAttribute(el, 'value') || el.value;\r
}\r
break;\r
case 'button':\r
}\r
break;\r
case 'textarea':\r
- val = iwfAttribute(el, 'innerText');\r
+ val = iwfAttribute(el, 'innerText') || el.value;\r
break;\r
case 'button':\r
if (el == ctl){\r
- val = iwfAttribute(el, 'innerText');\r
+ val = iwfAttribute(el, 'innerText') || el.value;\r
}\r
break;\r
case 'select':\r
// our html to inject contains a form node.\r
// bubble up the chain until we find a <form> node, or we have no parents\r
var elParent = el;\r
- while (elParent && elParent.tagName.toLowerCase() != 'form'){\r
+ // I have doubts about adding elParent.tagName here\r
+ // but I don't have better idea. -dpavlin\r
+ while (elParent && elParent.tagName && elParent.tagName.toLowerCase() != 'form'){\r
elParent = iwfGetParent(elParent);\r
}\r
\r
- if (elParent && elParent.tagName.toLowerCase() == 'form'){\r
+ if (elParent && elParent.tagName && elParent.tagName.toLowerCase() == 'form'){\r
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);\r
}\r
}\r
iwfAppendChild('body', elScript);\r
\r
} catch(e){\r
-iwfLog("IE Hack for injecting script tag...", true);\r
+//iwfLog("IE Hack for injecting script tag...", true);\r
//! IE hack\r
// IE needs a visible tag within a non-script element to have scripting apply... Don't ask me why, ask the IE team why.\r
// My guess is the visible element causes the page to at least partially re-render, which in turn kicks off any script parsing\r
}\r
} else {\r
// use default busy implementation...\r
- window.status = 'Remaining: ' + _iwfRequestsPending;\r
+ window.status = 'Remaining: ' + _iwfPendingRequests;\r
}\r
} else {\r
// they didn't define an end function,\r