458 |
// our html to inject contains a form node. |
// our html to inject contains a form node. |
459 |
// 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 |
460 |
var elParent = el; |
var elParent = el; |
461 |
while (elParent && elParent.tagName.toLowerCase() != 'form'){ |
// I have doubts about adding elParent.tagName here |
462 |
|
// but I don't have better idea. -dpavlin |
463 |
|
while (elParent && elParent.tagName && elParent.tagName.toLowerCase() != 'form'){ |
464 |
elParent = iwfGetParent(elParent); |
elParent = iwfGetParent(elParent); |
465 |
} |
} |
466 |
|
|
467 |
if (elParent && elParent.tagName.toLowerCase() == 'form'){ |
if (elParent && elParent.tagName && elParent.tagName.toLowerCase() == 'form'){ |
468 |
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); |
469 |
} |
} |
470 |
} |
} |