FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Ajax code not working





iyepes
Hi,

I've developed an app using php, mysql and ajax. It works fine in my developer enviroment, but when I load it in frihost, part of the ajax code stop working. Does anyone have suffered the same? the strangest part to me is that some code works, but other don't.

I've noticed that when I run a code that depends on a field that changes (example a listbox), the code doesn't work.

Do you have any idea about what is happening?


Thanks in advance.
escritor
If you posted a link to your page, which contains that code, it would be easier for Frihosters who are AJAX experts to identify the issue. Smile
iyepes
Thanks for your reply. I solved it with help of a friend. For some reason in my development enviroment when I call ajax code using "post" method, the receiving page is able to read the variables sent in the url. However when I use frihost, it is only able to read them if I use "get" method.

I'll have to change my code, since I'm sending textarea variables in some forms, so I can't send all them through "get".
escritor
Did you contact any moderator? Maybe that is a server limitation.
Peterssidan
You didn't forget to set the header when using POST?
Code:
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")

it should be before the send method.
escritor
Today I'm going to test an Ajax code for the first time. I hope that I won't have to deal with errors and such complexities.
iyepes
For me it's better to change the code. My app will run in a hosting that my client is going to choose, so I prefer having this issues here and not in the production enviroment.

I didn't understand what you meant about setting the header. I can send url variables, but they are only read when I use get method.
tidruG
I think this has been sorted out. I'll close this thread now.
If you're still facing problems, I recommend you use the other forums such as the HTML, Javascript and other forums that we have for support. Someone will be able to help you much faster there. This forum is meant mainly for support questions related to the Frihost Forums and other Frihost services not including the hosting. :)

-close-
Related topics
How to write a code which will keep bandwidth to a minimum?
"What's in" in Web Design
PHPBB question
AJAX or servlets?
AJAX tutorial [2nd part now updated]
I wanna Some Information about ajax
Ajax Stack Overflow IE
AJAX and PHP contact form
AJAX + PHP, UPDATE mysql table nto working.
AJAX $_POST
Display Previous and Next buttons not working
some AJAX/PHP problems...
AJAX silent bug ?!?
Preloading A Page
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Support and Web Hosting -> Frihost Support

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