Welcome Guest ( Log In | Register )




                Web Hosting Guide

 
Reply to this topicNew Topic
Checking Without Loading
khalilov
post Aug 31 2008, 07:25 PM
Post #1


Premium Member
Group Icon

Group: [HOSTED]
Posts: 279
Joined: 17-July 08
From: Atlantis
Member No.: 31,503
myCENTs:5.44


i like how some sites check the username you inputed and tells you if its not available without loading. Like hotmail when trying to make an email. How do you do that?
Go to the top of the page
 
+Quote Post
faulty.lee
post Aug 31 2008, 10:53 PM
Post #2


Super Member
Group Icon

Group: [HOSTED]
Posts: 500
Joined: 5-November 06
Member No.: 17,016
myCENTs:79.88


You need to use ajax to get the job done. Most website nowadays incorporate some form of ajax using javascript. Look up on ajax or XMLHttpRequest in google. That should get you enough sample code to get started.

To accomplish the end result, assuming you're using php, you need to send the already inputed username to a specific php page you've made via GET or POST method. GET is easier to do with ajax. In that php page, you just need to look up the username in your existing database and return a token to indicate if it's already existed. You can simply return a 1 or 0 using echo. You don't have to echo any html since you're will reading directly from your html's javascript. The lesser the data you pass around the better response you can get.
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   2 Jimmy89 2,199 4th November 2009 - 10:25 PM
Last post by: HannahI
No New Posts   3 takerraj 57 11th October 2009 - 06:09 PM
Last post by: yordan
No New Posts   8 TavoxPeru 1,584 6th July 2009 - 01:05 PM
Last post by: iG-Priya
No New Posts   2 magiccode9 603 8th September 2008 - 12:03 PM
Last post by: magiccode9
No New Posts   4 demolaynyc 3,467 2nd September 2008 - 02:06 PM
Last post by: magiccode9
No New Posts 6 ChristopherJ05 2,001 24th May 2008 - 04:06 AM
Last post by: iGuest
No New Posts 2 sparkx 1,171 29th February 2008 - 09:25 AM
Last post by: iGuest
No New Posts   7 Habble 4,291 25th February 2008 - 12:36 AM
Last post by: java-area
No New Posts   0 dserban 443 15th February 2008 - 11:02 AM
Last post by: dserban
No New Posts   0 sparkx 1,110 22nd December 2007 - 05:48 PM
Last post by: sparkx
No New Posts   6 toby 778 20th November 2007 - 04:51 PM
Last post by: toby
No New Posts   3 sparkx 2,137 16th November 2007 - 11:50 PM
Last post by: faulty.lee
No New Posts   5 jlhaslip 1,003 8th October 2007 - 10:33 PM
Last post by: vizskywalker
No New Posts   5 Vue 1,011 17th April 2007 - 04:37 AM
Last post by: patronus4000
No New Posts   2 bluefish 1,935 17th February 2007 - 03:07 AM
Last post by: bluefish


Web Hosting Powered by ComputingHost.com.