From 3e6ca83e26bae02061202f34cfbc38002b6d4d80 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 16 Nov 2005 15:33:08 +0000 Subject: [PATCH] r8899@llin: dpavlin | 2005-11-16 16:32:37 +0100 I have doubts about this fix -- elParent.tagName git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@66 07558da8-63fa-0310-ba24-9fe276d99e06 --- web/iwf/iwfajax.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/iwf/iwfajax.js b/web/iwf/iwfajax.js index 7d48796..d68e5c8 100644 --- a/web/iwf/iwfajax.js +++ b/web/iwf/iwfajax.js @@ -458,11 +458,13 @@ function _iwfInsertHtml(html, parentNodeId){ // our html to inject contains a form node. // bubble up the chain until we find a
node, or we have no parents var elParent = el; - while (elParent && elParent.tagName.toLowerCase() != 'form'){ + // I have doubts about adding elParent.tagName here + // but I don't have better idea. -dpavlin + while (elParent && elParent.tagName && elParent.tagName.toLowerCase() != 'form'){ elParent = iwfGetParent(elParent); } - if (elParent && elParent.tagName.toLowerCase() == 'form'){ + if (elParent && elParent.tagName && elParent.tagName.toLowerCase() == 'form'){ iwfLog('IWF Ajax Error: Attempting to inject html which contains a node into a target element which is itself a node, or is already contained by a node.\nThis is bad html, and will not work appropriately on some major browsers.', true); } } -- 2.20.1