jQuery & PHP: Running action in background -


So when you press on logout, you want to do something like that, you get a waiting message like "Wait" Its running ucp.php in the background? Mode = logout, and should refresh the site after its loading.

How should this be done ??

I'm new to Jquery, but so far I have given my link an ID, called #lollout, and

and then I did in jquery:

  jquery (document) .ready (function () {$ ('# tryout'). Click on (function () {logOut ();}); Function logOut () {var postFile = 'ucp .php? Mode = logout'; $ .post (postFile, function (data) {$ ("# message"). FadeIn ('slow'); }}}  

Now is this correct? And the line with # message, where it fades, I really do not feel right because "please wait" for me and

  function law Gout () {var postFile = 'ucp.php? Mode = logout'; $ ("#modern") fadein ('slow'). $ Post (postfile, function) {window.location.reload (); });}  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -