Hey yall me again,
I was just wondering how would I use ajax with the Login snippet? I have read lots on ajax and so I have decided to use jquery's easy ajax. So hear is what I have so far But i don't know where to go from here.
<script>
$(document).ready(function(){
$('.loginLoginForm').submit(function(){
var formData=$(this).serialize();
$.post('[[~109]]',formData);
return false;
})
})
</script>
I don't know very much about the Login snippet but I hope some of you guys can help me out with that part But basically what this code is doing is: A.Make sure all html on the page is loaded. B. when the user submits the Login Form with a class of loginLoginForm create a variable with all the fields and values and then use ajax to send that variable the resource 109 which has has this code in it:
[[!Login &tplType=`modChunk`]]
And at the end is says return false which just means don't complete the normal function of the click.This is placed so that the form wont go to another page. Now This is what I have so far And I think the next step is to put a call to a function on the end of the jquery ajax string to handle the response from the server. But I have no idea how to process the response from the login snippet. And help would be very great.
Thanks in advance
ModxNooby