jquery callback works in FF, not IE/Chrome ?

Posted on 2012-08-22
Last Modified: 2012-08-22
I have a very simple funtion that uses $.post to retrieve some html and insert it to the document.

It works fine i FF but not in IE/Chrome - not sure how I broke it, could you guys help me out here ?

The code is messy and all - but it used to work, just can't figure out what went wrong ??

Here's the JS function
function adv_soeg_2( )
	pagename = "tracktrace";
	var _rnd = Math.floor(Math.random()*1001);
	_pakkenr = $("#adv_pakkenr").val();
	if( _pakkenr.length < 8 )
		$("#adv_pakkenr").parent().parent().after("<tr><td colspan=2><div id='fejl_i_pakkenr' style='font-size:11px; background-color:#FF0000; color:#ffffff; margin:5px; padding:5px;'><img src='/img/icon/bullet_error.png'>&nbsp;Pakkenr skal v&aelig;re p&aring; mindst 8 tegn.</div></td></tr>").fadeIn(500);
	} else {
		$("#adv_pakkenr").parent().parent().parent().after("<tr><td colspan=2><div id='adv2_result' style='font-size:11px;'><img src='/img/ajax_spinner.gif'>&nbsp;S&oslash;ger i Track&Trace databasen...</div></td></tr>");
		console.log("Ready for AJAX : "+ _pakkenr );
		$.post("/ajax/ajax.php", {action:"search_tt", pakkenr:_pakkenr, resultdiv:"adv2_result", rnd:_rnd}, function(html){
			console.log("Server says : "+ html);
			$("#adv2_result").html( html );			
			findPOD( '', _pakkenr , _rnd );

Open in new window

In firebug in FF I see the "Ready for ajax" message and also the "Server says" message.
In Chrome firebug I only see the first.??

Propably a stupid error, just can't find it :/

Thanks for your help :)
Question by:internetservice_dk

    Author Comment

    Update : I updated jquery to latest version 1.8 and suddenly it works in Chrome - but still no luck in IE !!

    I can see in Charles proxy that the ajax is called and the result is correct html.

    Any good ideas out there ??

    Accepted Solution

    Seems like the update fixed it anyway :)

    Closing up her!

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
    Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now