I am creating a jquery object like so:
htmlCode = $("<div id='"+data.layoutDescriptions[i].id+"'></div");
It seems to be missing some elements mainly when I am doing this:
if(data.type == "ListView"){
htmlCode.append("<SELECT property='"+ data.property +"' size="+ data.listProps.length +" multiple>");
i = 0;
while(i < data.listProps.length){
htmlCode.append("<OPTION value='"+ i+1 +"'>"+ data.listProps[i] +"</OPTION>");
i++;
}
htmlCode.append("</SELECT>");
}
where data is a Json object.
When i do this as a string it works. e.g. instead of
htmlCode.append("<OPTION value='"+ i+1 +"'>"+ data.listProps[i] +"</OPTION>");
i would do
htmlCode = htmlCode + "<OPTION value='"+ i+1 +"'>"+ data.listProps[i] +"</OPTION>";
I want to find out what is missing so I want to see the Object i have tried the following:
alert(JQuery.htmlCode.stringify());
alert(htmlCode.html);
Nether work.
Any Ideas??
Thanks.