amir
01-25-2006, 05:42 AM
hi sir h r u?
sir i am facing very seriouse prg plz help me i have function i.e
-----------
var test_array = new Array();
function importXML(file_name)
{
var temp_var = new Array();
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.onload = createTable;
}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.onreadystatechange = function () {
if (xmlDoc.readyState == 4)
temp_var = createTable()
for(i = 0; i < temp_var.length; i++) {
if(temp_var[i] != ''){
test_array.push(temp_var[i]);
}
}
}
}
else
{
alert('Your browser can\'t handle this script');
return;
}
xmlDoc.load(file_name);
return test_array;
}
-----------
i call this function like this
function importXML('test.xml');
"this function works very fine but the requirement is this i have to give this code to my client and he can run this but he have to get xml file from my server like this"
function importXML('http://www.naeembhatti.com/test.xml');
it does not work for him and display the error in javascript "access denied", i think when he can't access the file then he display this error but when i use this code in my domain(www.naeembhatti.com) it works fine.
my question is give me a solution to XmlLoad('www.naeembhatti.com/test.xml'); and it will work how?
plz plz help me i have deadline tom.
sir i am facing very seriouse prg plz help me i have function i.e
-----------
var test_array = new Array();
function importXML(file_name)
{
var temp_var = new Array();
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.onload = createTable;
}
else if (window.ActiveXObject)
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.onreadystatechange = function () {
if (xmlDoc.readyState == 4)
temp_var = createTable()
for(i = 0; i < temp_var.length; i++) {
if(temp_var[i] != ''){
test_array.push(temp_var[i]);
}
}
}
}
else
{
alert('Your browser can\'t handle this script');
return;
}
xmlDoc.load(file_name);
return test_array;
}
-----------
i call this function like this
function importXML('test.xml');
"this function works very fine but the requirement is this i have to give this code to my client and he can run this but he have to get xml file from my server like this"
function importXML('http://www.naeembhatti.com/test.xml');
it does not work for him and display the error in javascript "access denied", i think when he can't access the file then he display this error but when i use this code in my domain(www.naeembhatti.com) it works fine.
my question is give me a solution to XmlLoad('www.naeembhatti.com/test.xml'); and it will work how?
plz plz help me i have deadline tom.