Author Topic: Ajax not working in FIREFOX Browsers!!! WTF???  (Read 587 times)

Offline Sim

  • Level 13
  • *
  • Posts: 104
  • Reputation: +1/-1
    • View Profile
    • Online RPG Creator
Ajax not working in FIREFOX Browsers!!! WTF???
« on: January 18, 2010, 06:17:39 PM »
when i submit my form, it shows teh alert box news successfully added in IE, but when I check it in FireFox, it doesnt show that message or add the news to the mySQL DB.

any ideas whY?


Code: (text) [Select]
$(document).ready(function(){           
    $("#save").mouseup(function () {
        $("#error").html("Saving...");
        var News = document.form1.textNews.value;
        var Subject = document.form1.textSubject.value;
        var GameName = document.form1.hidden.value;
 
        //$.post("./gamefiles/admin/js/ajax/crimegroupadd.php", $('#form1').serialize()),
        $.post("http://rpg.antgaming.com/gamefiles/admin/js/ajax/newsadd.php", { textNews: News, textSubject: Subject, hidden: GameName },
            function(data) {
                alert(data);
                $("#error").html(data);
            });
       
    });
});

Offline Harkins

  • Level 28
  • **
  • Posts: 424
  • Reputation: +11/-2
  • Coder, blogger, entrepreneur.
    • View Profile
    • Push CX - Blog
Re: Ajax not working in FIREFOX Browsers!!! WTF???
« Reply #1 on: January 18, 2010, 09:31:17 PM »
I suspect you either reference an IE-only DOM extension above this code or have invalid HTML. But on the off chance it's an AJAX problem, $.post is a wrapper of $.ajax and silently discards any errors. Try using $.ajax and $.ajaxError to get at the error.

I'd also open the Firebug console, maybe it'll report an error in the JS or AJAX HTTP request without you even changing code.

Visit #bbg on irc.freenode.net to talk browser games anytime.

Offline Sim

  • Level 13
  • *
  • Posts: 104
  • Reputation: +1/-1
    • View Profile
    • Online RPG Creator
Re: Ajax not working in FIREFOX Browsers!!! WTF???
« Reply #2 on: January 18, 2010, 10:13:10 PM »
problem fixed. seemed like error was a keyword in firefox.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal