views:

32

answers:

1

Right now I have this GET request which works in Chrome but not in IE or FF.

      var dire = $(this).attr('dir');
   if(dire == "ASC"){
     var dp = "DESC";
   }
   else if(dire == "DESC"){
     var dp = "ASC";
   }
   else{
     var dp = "NA";
   }

   $(this).attr('dir',dp);

   var col = $(this).attr('col');

   $('#entries').fadeOut(100,function(){
        $('#loadingGif').show();
        $.get("getData.php?fake="+makeid(),{ status: "R", column: col, dir: dp},requestCompleteRecorded);
      });

In my php file getData.php I should never get "NA" in the dir GET request. However for some reason in FF and IE I get "NA". Basically I'm just flipping the attribute and the variable dp goes straight into an attribute field.

So why does this work in Chrome but not FF or IE?

+1  A: 

dir and col are not valid html attribute. That maybe the reason for the error. try using class or rel.

Reigel
it turned out I couldn't use `dir` as an attribute, I switched it to `title` and everything is fine.
Albinoswordfish