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': |
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 |
} |
} |