[jQuery] Re: Simple Jquery AJAX post

2009-09-30 Thread Mark Gorman
in my example i would isted of alert($(data).find('result').text()); use $('.loading').text($(data).find('result').text()); if you had html then $('.loading').html($(data).html()) would work i think so long as you returned html you might have to tell it what the return type is just it normaly pic

[jQuery] Re: Simple Jquery AJAX post

2009-09-30 Thread mattastic
Thanks very much for your reply, however, could you please tell me how I can populate the loading div with the response text, rather than an alert? Many thanks On Sep 29, 1:56 pm, Mark Gorman wrote: > yay for it not showing what you said before i posted, try on your > start and stop doing $(doc

[jQuery] Re: Simple Jquery AJAX post

2009-09-29 Thread Mark Gorman
yay for it not showing what you said before i posted, try on your start and stop doing $(document).ajaxStart(); for some reson is can be quite silly with that also use $(document).ready(); its nicer that way and avoids unexpected issues On Sep 29, 1:52 pm, Mark Gorman wrote: > this is how you do

[jQuery] Re: Simple Jquery AJAX post

2009-09-29 Thread Mark Gorman
this is how you do a post with loading at the top middle ish .loading { display: none; position: absolute; top: 0px; left: 50%; } $(document).ready(function(){ $(document).ajaxStart(function(){ $('.loading').show(); }); $(document).ajaxSt

[jQuery] Re: Simple Jquery AJAX post

2009-09-29 Thread mattastic
I've had ago at a test ajax page, However, I'm having trouble getting the lopading graphic to show. MY code is below, can anyone help? function register(){ $.ajax({ type: "POST", url: "test.cfm",

[jQuery] Re: Simple Jquery AJAX post

2009-09-29 Thread mattastic
Thanks very much for your replies. Could you please post the whole page code? So I can see how the javascript, html and ajax works together I'mn struggling to understand how the whole page is layed out. Thanks in advance On Sep 28, 2:18 pm, Mark Gorman wrote: > http://docs.jquery.com/Ajaxh

[jQuery] Re: Simple Jquery AJAX post

2009-09-28 Thread Mark Gorman
http://docs.jquery.com/Ajax has everything you need but a simple example would be... $(document).ready(function(){ $.ajaxStart(function(){ $('.loading').show(); }); $.ajaxStop(function(){ $('.loading').hide(); }); //i have trouble with the post permiters so i always do it the {} way but you c

[jQuery] Re: Simple Jquery AJAX post

2009-09-28 Thread Mark Gorman
i did try ealer to send a reply but that did not seem to apper so heres a shorter version http://docs.jquery.com/Ajax has everything you need, to make a loading image come up on start you can just ether in your click function inlude $(".loading").show(); or use the event http://docs.jquery.com/A