Loading XML/File into DIV makes jQuery fail
http://9publishing.co.uk/test/xml/jquery/
The links at the top load XML/file/content into the DIV. This works ok.
I then want the images (from 2nd link) draggable to the right hand menu. It doesn't work.
However if I select everything, view source code, save the file and view it (
http://9publishing.co.uk/test/xml/jquery/jj.asp ) it works fine!
Can someone shed any light on the situation please?
Here is the code that loads the XML/file/content into the DIV
-
var xmlHttp
function showCD(str)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url=str;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
}
}
function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}