JQuery / Ajax

Any help regarding any computer based programming language (non serverside) can be requested and recieved here.
Post Reply
Gebbo
Posts: 554
Joined: Tue May 16, 2006 3:22 pm

JQuery / Ajax

Post by Gebbo »

Hello

Does anyone know where I can get a good tutorial on how to build a php ajax / jquery login / registration system ?


.............................:: Spirit of Fire ::..................................

Image
Freedom Fighter
Posts: 479
Joined: Tue May 16, 2006 11:53 am

Post by Freedom Fighter »


No Problem. There are many resources out there but i find these to be the
most informative

::AJAX::
http://www.w3schools.com/ajax/default.asp

::JQUERY::
http://www.w3schools.com/jquery/default.asp



Gebbo
Posts: 554
Joined: Tue May 16, 2006 3:22 pm

Post by Gebbo »

Freedom Fighter wrote:
No Problem. There are many resources out there but i find these to be the
most informative

::AJAX::
http://www.w3schools.com/ajax/default.asp

::JQUERY::
http://www.w3schools.com/jquery/default.asp



Ive read those alwready but I was looking for more specific tutorials related to login to see what kind of methods people use. By methods i mean more specifically related to the Ajax, jquery part not the php part.

How to get the data from the forms*
How to send the data from the forms to the php file and how to receive a response
.............................:: Spirit of Fire ::..................................

Image
Freedom Fighter
Posts: 479
Joined: Tue May 16, 2006 11:53 am

Post by Freedom Fighter »


It is very hard to find tutorials specific to a function for the new languages.
I would suggest looking around for free login scripts of forum scripts witch use Ajax and picking it apart.

I have learned tonnes by learning from example.
Gebbo
Posts: 554
Joined: Tue May 16, 2006 3:22 pm

jquery

Post by Gebbo »

Thanks, I found a nice tutorial which showed me how to use $.post() and $.get() jquery functions which helped me out a lot. Jquery is really neat!
.............................:: Spirit of Fire ::..................................

Image
Freedom Fighter
Posts: 479
Joined: Tue May 16, 2006 11:53 am

Post by Freedom Fighter »


Nice, I havent quite stepped into that realm yet but most likely soon!
Gebbo
Posts: 554
Joined: Tue May 16, 2006 3:22 pm

Ajax

Post by Gebbo »

You should, its really really simple, I mean for a login you would just do

Index.html

<script - >
$(****).ready(function() {
$.post("login.pgp",{Username: $("#username").val(), Password: $("#password").val(),function(data) {
if(data == "Success") $("body").append("You have loagged in"); $("#loginform").css("display","none");
// Dosplay the login class (Default - Hidden)
$(".loginpage").css("display","block");
// Load the members page data
$(".loginpage").load("loginpage.php");
});

</script - >

Login.php

if($_POST['']) {
// Proceeed with regular php scripting
echo 'Success';
}


Thats just a messy example but its as simple as that! Jquery for the Win! Check it out, Im sure you will find something neat for your website!
.............................:: Spirit of Fire ::..................................

Image
Post Reply