I’m having problems with append() in ie. I checked most solutions but they did not work.
IE is giving me the jQuery error at qObject.append(createSurveyXmlAnswer(aID));
Why does this happen and are there any solutions?
function createSurveyXmlAnswer(aID){
var xmlString = "<answer id = '" + aID + "'>";
return xmlString;
}
function getAnswer(){
var aID;
var qID = parseInt($(document.getElementById("screenView").childNodes[0]).attr("id"));
var qType = ($(document.getElementById("screenView").childNodes[0]).attr("class"));
var qObject = $("<question id = "+qID+">");
if(qType.toLowerCase() == "singleselect"){
aID = singleSelectedSelection(qID);
qObject.append(createSurveyXmlAnswer(aID));
setAnswer(aID, qID, qObject);
}
edit:
I’m using this to build a jQuery object > xml doc. qID, qType are form attributes, aID is the input value. The form was created on the fly.
I used javascript xml dom instead of jQuery, more coding but it works on IE.