[FX.php List] [off] Forcing jQuery to wait for a PHP page to render

Bob Patin bob at patin.com
Wed Jan 18 09:50:52 MST 2012


Is there a way to force jQuery to wait until a PHP page renders? Here's what I'm seeing:

Using this code:

$('.make_cell').click(function(){
	var theid = $(this).attr('id');
	$('#content')
	.fadeOut()
	.load('v2_hero.php?mk=' + theid)
	.fadeIn();
	return false;
});

I see this:

(assuming my DIV contains page "A" and is loading in "B")

I'm viewing page A
I click the link to load page B

I see a fadeIn and see page A
… then in a second or less, B loads

Is this because my PHP page hasn't fully rendered yet and the jQuery outran it? If so, is there a way to tell JQ to wait for the PHP to fully render?

Thanks,

Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
Google+: http://www.longtermsolutions.com/plus
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting 
FileMaker Hosting for all versions of FileMaker



More information about the FX.php_List mailing list