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 can just pass a array
$.post('example.php',{peram1 : 'hello',peram2 : 'world', myval : $
('.myinput').val()},function(data){
alert($(data).find('result').text());
});
});
if the return was xml ie <message><result>it saved</result></message>
then you would get it saved in a alert watch some of the functions
though if you tell it to expect something as it will just
brake. .loading i am useing as your loading graphic or a div
containing it etc using css to absolutely position it or putting it
wherever you want it. you can do better things if you want but if you
just trying things for the first time this will do :P
On Sep 28, 10:58 am, mattastic <mharris...@yahoo.co.uk> wrote:
> Could soneone please show me an example of a simple ajax post to a
> coldfusion page, with a loading graphic?
>
> I cant find an appropriate example in the documentation.
>
> Thankyou
No comments:
Post a Comment