myForm.appendChild(domElement) doesn't work [message #662216] |
Tue, 29 March 2011 18:26 |
g-dawg Messages: 2 Registered: March 2011 |
Junior Member |
|
|
I have the following javascript in my app
function addDataField(frmObj, typeStr, nameStr, valueStr){
alert(document.getElementsByTagName("form").length + " forms exist");
var fld = document.createElement("input");
fld.type = typeStr;
fld.name = nameStr;
fld.value = valueStr;
alert("input field created"); // <----- This displays fine
document.getElementsByTagName("form")[0].appendChild(fld);
alert(document.getElementsByName(nameStr)[0].name + "\n" +
document.getElementsByName(nameStr)[0].value); // <----- This never displays in Eclipse debugger
}
This functionality works wonderfully in IE and FF - but not in the Eclipse debugger tab. My big issue is that I'm trying to debug the PHP code that follows this functionality and I NEED this to function in order for the PHP to get the proper POST data. This could be a configuration issue (probably is) but I haven't been able to figure out why all of my other javascript is working but this one function/method is not.
[Updated on: Tue, 29 March 2011 19:19] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03336 seconds