Phutte,

>                               $.post('<?php echo $submit_action_url; ?>',
>                                  { name:"nickname", password:"secretpswd",
>loginAttempt:"TRUE77" },
>                                       function(data){
>                                       alert("Data Loaded: " + data);
>                                               $.unblockUI();
>                                       }
>                               );
>
>QUESTION: why isn't the page refreshed, my submit retrieves the $.post
>successfully into the alert(), but the page isn't refreshed.

The $.post() function only does what you tell it to do. In this case, you're
telling it to just alert() the data received. If you want to update content
on the page, you're going to need to explicitly define what content you want
to replace.

For example, if you want to replace the element <div id="#loginForm" /> with
the content you received, you would replace your alert with the following:

$("#loginForm").html(data);

Also, instead of using the $.post() function, you could use the load()
method (i.e. $("#loginForm).load();) to do an AJAX operation and
automatically update the content for you.

See the load() method for more information:
http://docs.jquery.com/Ajax#load.28_url.2C_params.2C_callback_.29

-Dan

Reply via email to