jquery callback works in FF, not IE/Chrome ?

Posted on 2012-08-22
Medium Priority
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
  • 2

Author Comment

ID: 38319545
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

internetservice_dk earned 0 total points
ID: 38319899
Seems like the update fixed it anyway :)

Closing up her!

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…
Suggested Courses
Course of the Month16 days, 6 hours left to enroll

850 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