// 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