Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
load XML failure in FireFOX
Old 03-11-2008, 11:39 AM load XML failure in FireFOX
Novice Talker

Posts: 10
Name: Muhammad Abrar
Trades: 0
following code does not work for me.
xmlDoc=document.implementation.createDocument(""," ",null);
xmlDoc.async=false;
xmlDoc.onload= Test();
xmlDoc.load("books.xml");
function Test()
{
alert('tested');
}
If any one having any idea then please give me a chance of thanks.
AbrarNazeer is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-11-2008, 12:42 PM Re: load XML failure in FireFOX
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
Try changing
Quote:
Originally Posted by AbrarNazeer View Post
xmlDoc.onload= Test();
to
Code:
xmlDoc.onload= Test;
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 03-13-2008, 03:45 AM Re: load XML failure in FireFOX
Novice Talker

Posts: 10
Name: Muhammad Abrar
Trades: 0
Thanks for ur Time willcode4beer!

this issue has been resolved, but now there is error msg
"Error: uncaught exception: Permission denied to call method
Location.toString"
on line
"xmlDoc.load".
Not on same Domain but on Cross Domain Only.
AbrarNazeer is offline
Reply With Quote
View Public Profile
 
Old 03-13-2008, 02:05 PM Re: load XML failure in FireFOX
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
That one is caused by the security model in the browser. It is designed to prevent calls to other domains.
The easiest way around that is to proxy the request (in other words, have a page on your server that retrieves the file from the other server), that way, the call looks like the same domain to the browser
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 03-14-2008, 04:29 AM Re: load XML failure in FireFOX
Novice Talker

Posts: 10
Name: Muhammad Abrar
Trades: 0
On client machine (Cross Domain) , how can i put my web page which will "read file from the other server". Client only puts my "Script code" on his page.
AbrarNazeer is offline
Reply With Quote
View Public Profile
 
Old 03-14-2008, 11:00 AM Re: load XML failure in FireFOX
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
Quote:
Originally Posted by AbrarNazeer View Post
On client machine (Cross Domain) , how can i put my web page which will "read file from the other server". Client only puts my "Script code" on his page.
I thought I explained that.

The data needs to come from the same domain as the page loaded.

So, if your javascript is going in other peoples web pages, then they will need to proxy the external data.
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to load XML failure in FireFOX
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22610 seconds with 12 queries