Question:
php ajax and Firefox mozilla?
Nepal
2009-08-21 01:19:07 UTC
Following script works in Explorer but not in Mozilla Firefox please help me.





click problem



test.php ==>

$q=$_GET["q"];
echo $q;
?>

when i click on CLICK PROBLEM it display "1" in explorer but in Firefox it display "undefined". Whats the problem??/
Above code works fine in Internet Explorer but not in Firefox 3.
Three answers:
just "JR"
2009-08-21 01:49:40 UTC
Your AJAX call is incomplete

"xmlhttp=GetXmlHttpObject();" is insufficient to work on all browsers.

Go to http://www.web2coders.com and download the "miniblog" script.

It includes an AJAX system in Php (SAJAX) that is specially adapted to Php. See how it is used and apply it to what you want to do.

Good luck!
Cristiano
2009-08-21 10:53:02 UTC
He is right. Your ajax call is incomplete check this post for the making it work with all browsers:



http://mcloide.wordpress.com/2009/01/09/creating-your-own-javascript-ajax-request/



Another thing, to help debug on Firefox, install Firebug and on your js script place console.log (' your debug string ');
anonymous
2009-08-21 03:57:14 UTC
It might be that you're using innerText - I can't see what you've put here -



document.getElementById("txtHint").inn…



- as Yahoo has truncated it. If you are trying to use innerText then that will be the issue as it is an IE only property. Use innerHTML instead.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...