SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: jQuery AJAX IE7

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2007
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow jQuery AJAX IE7

    Hi guys, I am doing an ajax post with jquery and on success setting the html of a div to the result msg, this works fine in firefox, for some reason it does not in IE. If I alert the msg in the success I see the returned html but for some reason the html of the results div is not set or appears empty. Funny thing, if I change jQuery('#results').html(msg); tp jQuery('#results').html('HELLO'); I see HELLO. Here is my code, thanks.

    Code:
    jQuery.ajax({
    	    type: 'POST',
    	    data: 'temp_key='+temp_post_key_n,
    	    dataType: (jQuery.browser.msie) ? "text" : "xml",
    	    url:  myURL,
    	    success: function(msg){
                    jQuery('#results').html(msg);
    	    }
    	});

  2. #2
    Function Curry'er JimmyP's Avatar
    Join Date
    Aug 2007
    Location
    Brighton, UK
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What happens if you don't specify the dataType? Does it work?
    James Padolsey
    末末末末末末末末末末末末末末末末末末末
    Awesome JavaScript Zoomer (demo here)
    'Ajaxy' - Ajax integration solution (demo here)

  3. #3
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shouldn't you be using jQuery.post?
    mmj

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Location
    Europe
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have the same issue, .ajax() working in FF but not in IE7. Did you resolve it?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •