Hi there,
This error appears while iterating through <input> tags. Once a condition is satisfied a call to removeChild() is made. It is this call that produces error
NS_ERROR_XPC_BAD_CONVERT_JS in firefox 2.0
Code fragment follows
var objInputs = document.getElementsByTagName("input"); // get all input tags
var con = document.getElementById('AddCallReport'); // parent container holding everything aka form id
The indexOf methods seem to be satisfied since when there are no id's containing "$$PK_", the error is not produced. The items searched for by indexOf show up in DOM Inspector and are direct children of the con object.
I googled around for a few hours and found a plethora of different circumstances that the error is produced, but nothing along these lines.
The idea of this is to reset a form after a xhr call but i suppose a location.href(self) would be more simple.
Any ideas
Many thanks in advance
This error appears while iterating through <input> tags. Once a condition is satisfied a call to removeChild() is made. It is this call that produces error
NS_ERROR_XPC_BAD_CONVERT_JS in firefox 2.0
Code fragment follows
var objInputs = document.getElementsByTagName("input"); // get all input tags
var con = document.getElementById('AddCallReport'); // parent container holding everything aka form id
Code:
for (var i = 0; i < objInputs.length; i++)
{
// lets avoid the controls shall we
if (objInputs[i].type == "button" || objInputs[i].type == "reset")
continue;
//
// Now test for certain string instances in identity attribute
// and remove them
if ((objInputs[i].id.toString().indexOf("$$PK_") != -1) || (objInputs[i].id.toString().indexOf("$$Qty_") != -1))
{
var strId = objInputs[i].id.toString();
var aVar = con.removeChild(strId);
}
}
I googled around for a few hours and found a plethora of different circumstances that the error is produced, but nothing along these lines.
The idea of this is to reset a form after a xhr call but i suppose a location.href(self) would be more simple.
Any ideas
Many thanks in advance