jenspen Posted October 26, 2006 Share Posted October 26, 2006 Please pardon me if my post is redundant in any way; I've searched awhile for the answer to this, and, as yet, I am still in the dark.I was testing a "dynamic div" type script that I found at http://www.dhtmlgoodies.com/index.html?whichScript=ajax_dynamicArticles which uses ajax (my first ajax attempt at all).I had to alter the thing a little to remove one misplaced "div" tag in the html portion. Other than that, I left everything the same (for testing purposes, but I'm hoping to learn from it and create something similar).Here's the thing: I first uploaded it to one of the domains I maintain (hosted by uslec), and it worked like a charm (only the first link works, though; it's the only one I truly included. The rest of the "articles" don't exist at this time). Happy that it worked, I decided I'd put it on my personal domain as well (hosted by godaddy) using EXACTLY THE SAME DIRECTORY STRUCTURE AND FILENAMES... and... it didn't work... ???? WHY?! All I get is a perpetual waitmessage (onloading message). Is it something having to do with protocols or webserver applications? Pardon my ignorance; I'm a newbie. :)Everything is identical... I can't figure this out!... can anyone help????!?!?!WORKING SCRIPT: http://www.longinodist.com/test/indexMAIN2.htmlNON-WORKING SCRIPT: http://www.jenniferspengler.com/test/indexMAIN2.htmlThank you, thank you, thank you - IN ADVANCE!! :)~Jen Quote Link to comment Share on other sites More sharing options...
Barand Posted October 27, 2006 Share Posted October 27, 2006 If I read your problem correctly, you are trying to send an xmlhttp.request from javascript in a page on one domain to invoke a script in another domain and not having any success.As a workaround you can invoke a local php script from your js script and send the xmlhttp request from that php script::localscript.php::[code]<?php $http = new COM("MSXML2.ServerXMLHTTP"); $http->open ("GET","http://www.otherdomain.com/page.php", false); $http->send(); echo $http->ResponseText();?>[/code] Quote Link to comment Share on other sites More sharing options...
jenspen Posted October 29, 2006 Author Share Posted October 29, 2006 Actually, everything I need is on the same domain (the file it's trying to retrieve is actually even in the same directory) and no requests are being made outside of it.I actually know more about the problem now; I downloaded firebug, and I found out the error sent by the server: --<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>405 Method Not Allowed</TITLE></HEAD><BODY><H1>Method Not Allowed</H1>The requested method POST is not allowed for the URL /test/bottom.html.<P><HR><ADDRESS>Apache/1.3.33 Server at jenniferspengler.com Port 80</ADDRESS></BODY></HTML>--Have any ideas about how to get around that?Your idea may still be a good workaround, but I'm not savvy enough to put it into motion, because I'm not sure what variable to reference (or HOW to reference it) in the php script so that it will know exactly which file to retrieve, since there will be multiple possible requests, and all must go through the same script.The server version I'm on is Apache 1.3.33 and I'm wondering if that has something to do with the problem. The version of the server on which the script works is something like 2.1.57 (don't have the info in front of me).What do you think?!(Thanks for your help thus far.)~Jen Quote Link to comment Share on other sites More sharing options...
Barand Posted October 29, 2006 Share Posted October 29, 2006 To be honest, I'm not sure what the error message means, but my first reaction on reading it was to try GET method instead of POST and see if that works. Quote Link to comment Share on other sites More sharing options...
jenspen Posted October 29, 2006 Author Share Posted October 29, 2006 Gosh! HOW SIMPLE!! And... EFFECTIVE!Barand, this seems to have done the trick... thank you, thank you, thank you.I'll see if anything crazy happens, but for now, it appears the problem is "solved."Y'all can mark this one "resolved" now. :)~Jen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.