FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

AJAX Issue

 


polly-gone
Okay, so I am having a bit of an AJAX issue.

I am using these three documents:

http://nickanderegg.pastebin.com/f7c8056fd for the AJAX library.

http://nickanderegg.pastebin.com/f2f908bb5 for the test page.

http://nickanderegg.pastebin.com/f24f3971b for the "fakeserver" page.

Now, when I access the test page at http://atomicdingo.net/testing/ajaxtest.html,
"Before Javascript" appears as text, the "Before Hand" alert comes up, the "Before DoGet" alert comes up, and then the document says "After Javascript". For some reason, when I say
Code:
ajax.doGet('fakeserver.php', hand);
the rest of the javascript stops executing. What is the problem?

Thanks,

-Nick Smile Smile Smile
sonam
If I good understand your question you want to print OK from php file, is't it? Confused Try to change your php in:
Code:
<?php
echo "OK";
?>

without two first lines to see is it work or not.

Sonam
polly-gone
I tried removing it so it only prints. It still doesn't work.

-Nick Smile Smile Smile
gcaughill
polly-gone wrote:
Okay, so I am having a bit of an AJAX issue.

I am using these three documents:

http://nickanderegg.pastebin.com/f7c8056fd for the AJAX library.

http://nickanderegg.pastebin.com/f2f908bb5 for the test page.

http://nickanderegg.pastebin.com/f24f3971b for the "fakeserver" page.

Now, when I access the test page at http://atomicdingo.net/testing/ajaxtest.html,
"Before Javascript" appears as text, the "Before Hand" alert comes up, the "Before DoGet" alert comes up, and then the document says "After Javascript". For some reason, when I say
Code:
ajax.doGet('fakeserver.php', hand);
the rest of the javascript stops executing. What is the problem?

Thanks,

-Nick Smile Smile Smile


Whenever I have had issues like this, I was either:

1. Getting my paths wrong.
2. Returning data in a form I did not expect.
3. Having Javascript errors.

I suggest using the Firefox extension Firebug for its debug capabilities. Then you can debug your Javascript and hopefully find the error that way.
polly-gone
Well, it isn't a path error, and it should be returning it in the correct form because I have the header set. It is definitely a JavaScript error and I can't figure out what. If you look at the code for the test page, you see that it is supposed to run a request with AJAX and return that result which should be a pop-up, but then after that another alert that I put in there as a check mark doesn't even execute. What could be causing this problem?

The AJAX object is instantiated at the top so I don't think that that is the problem, but I think the JavaScript is stopping somewhere in the middle of the call to the FakeServer page. Its not the the page stops because after the two checkpoint alerts I put in, the test continues to print on the screen.

Thanks ahead of time,

-Nick Smile Smile Smile
Related topics
Gmail vows!
Ajax - Qu'en pensez-vous ?
A use for Ajax?
AJAX tutorial
AJAX based 5 star rating script
usb external HD
Co myslicie o mojej stronce??
AJAX - asynchronous JavaScript and XML
A Ajax tutorial
cpanel q: Doesn't seem to be a firewall issue
Football Manager 2005 (PC) Review feat screeshots
Building my own comp
AJAX?
[TUTORIAL] Ajax para quem só ouviu falar
AJAX web coding
Help making an AJAX messaging system
AJAX
G3 and Tiger Raid issue, Help
The origin of AJAX
Dungeons and Dragons, in paper issue
PHP image uploads with progress bar AND resizing? [Resolved]
PHP issue
AJAX or servlets?
Hotmail and Outlook
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.