homepage Welcome to WebmasterWorld Guest from 54.166.110.222
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
jquery .ajax works locally but not remote
first solid attempt at ajax
sneaks




msg:3537638
 12:49 am on Dec 31, 2007 (gmt 0)

hi so i am attempting to send database updates from a form using jquery .ajax on apache server, php and mysql.

everything works fine when i run it locally and it should work fine remote but i am getting this error:

Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

i dont get it because from what i understand the error results from when there is an attempt to access files from multiple servers but everything is on the one server.

i have tried using the domain name as well as ip address only to get the same result.

any help would be appreciated...
jd

 

mehh




msg:3537925
 2:50 pm on Dec 31, 2007 (gmt 0)

It sounds like your trying to open a cross domain query. Make sure you are asking for a page from the same domain name, if this doesn't work try using relative paths instead of absolute eg. bar/foo.xml instead of http://www.example.com/other/bar/foo.xml

XtendScott




msg:3537947
 3:52 pm on Dec 31, 2007 (gmt 0)

For "Security" reasons, http_requests are denied permissions to access other domains.

If you are on the same server, you could use server side(php, asp, etc) to local file to fetch the info requested through the ajax call.

sneaks




msg:3537951
 3:59 pm on Dec 31, 2007 (gmt 0)

going relative totally worked! i prolly should have but didnt try that because i had problems on an other server.

anyways thanks a ton for the fresh brain cells!
jd

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved