0

I am having a problem with a jquery on IE6 and I don't know how to check were the problem is. IETester does not seem to have this feature. Is there anything else for testing?

OK I am showing some code that it is supposed to delete staff. This Does Not work in IE6:

$(".delete").click(function() {
                $(this).next('.loading').fadeIn();

                var commentContainer = $(this).parent();
                var id = $(this).attr("id");
                var string = 'solutionID='+ id;

                $.ajax({
                   type: "POST",
                   url: "/js/ajax/delete-comment.php",
                   data: string,
                   cache: false,
                   success: function(){
                    commentContainer.slideUp('slow', function() {$(this).remove();});
                    $('.loading').fadeOut();
                  }

                 });

                return false;
                });
firefiter
  • 96
  • 8
  • 1
    Can you be a little more specific than "I am having problems". – AaronS Jan 05 '12 at 18:19
  • @AaronS: With IE6 it's pretty hard to be more specific. It's errors don't really help much. – gen_Eric Jan 05 '12 at 18:21
  • 1
    Try using [Firebug Lite](http://getfirebug.com/firebuglite) to help you out. – gen_Eric Jan 05 '12 at 18:22
  • It is an ajax jquery script that adds and return results form database. It works everywhere else but IE6. I am just looking for a way to find out where the problem is in IE6. – firefiter Jan 05 '12 at 18:23
  • @Rocket: However, he can add information such as what he's trying to do, post code that isn't working, etc. There's not much this community can do to help if the only information is "I am having problems" – AaronS Jan 05 '12 at 18:23
  • the ajax call or the callback doesn't work? – Burntime Jan 05 '12 at 18:49

5 Answers5

2

Try Firebug Lite:

Community
  • 1
  • 1
Ayman Safadi
  • 11,502
  • 1
  • 27
  • 41
1

Usually you can try to find the function where the error appears, with:

alert();

It's annoying but normally it don't take that much time.

gen_Eric
  • 223,194
  • 41
  • 299
  • 337
Burntime
  • 2,334
  • 2
  • 15
  • 20
0

Microsoft makes Windows XP VHD images with IE6 installed for testing/debugging purposes; you should try to use that instead.

Also, make sure you install IE Developer toolbar into IE6 once you have the VM up and running; will make debugging much easier.

Frank Rosario
  • 2,512
  • 5
  • 31
  • 47
0

I tried out your code and it works also in IE for me. I just make some indentions. What exactly is the error you have?

$(".delete").click(function(event) {
  var item = $(this),
      commentContainer = item.parent(),
      id = item.attr("id"),
      string = "solutionID=" + id;

  item.next(".loading").fadeIn();

  $.ajax({
    type: "POST",
    url: "/foo.php",
    data: string,
    cache: false,
    success: function(){
      commentContainer.slideUp("slow", function() {
        item.remove();
        $(".loading").fadeOut();
      });
    }
  });
  event.preventDefault();
});

Demo: http://brbforum.de/stackoverflow_ie6_ajax_test.html

Burntime
  • 2,334
  • 2
  • 15
  • 20
0

You can download scd10en.exe, the Microsoft Script Debugger. It has the ability to step through scripts, set breakpoints, and run commands from a console.

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265