|
|
|
| Web Hosting Guide |
![]() ![]() |
Checking Without Loading |
Aug 31 2008, 07:25 PM
Post
#1
|
|
|
Premium Member 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?
|
|
|
|
Aug 31 2008, 10:53 PM
Post
#2
|
|
|
Super Member 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. |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
2 | Jimmy89 | 2,199 | 4th November 2009 - 10:25 PM Last post by: HannahI |
|||
![]() |
3 | takerraj | 57 | 11th October 2009 - 06:09 PM Last post by: yordan |
|||
![]() |
8 | TavoxPeru | 1,584 | 6th July 2009 - 01:05 PM Last post by: iG-Priya |
|||
![]() |
2 | magiccode9 | 603 | 8th September 2008 - 12:03 PM Last post by: magiccode9 |
|||
![]() |
4 | demolaynyc | 3,467 | 2nd September 2008 - 02:06 PM Last post by: magiccode9 |
|||
![]() |
6 | ChristopherJ05 | 2,001 | 24th May 2008 - 04:06 AM Last post by: iGuest |
|||
![]() |
2 | sparkx | 1,171 | 29th February 2008 - 09:25 AM Last post by: iGuest |
|||
![]() |
7 | Habble | 4,291 | 25th February 2008 - 12:36 AM Last post by: java-area |
|||
![]() |
0 | dserban | 443 | 15th February 2008 - 11:02 AM Last post by: dserban |
|||
![]() |
0 | sparkx | 1,110 | 22nd December 2007 - 05:48 PM Last post by: sparkx |
|||
![]() |
6 | toby | 778 | 20th November 2007 - 04:51 PM Last post by: toby |
|||
![]() |
3 | sparkx | 2,137 | 16th November 2007 - 11:50 PM Last post by: faulty.lee |
|||
![]() |
5 | jlhaslip | 1,003 | 8th October 2007 - 10:33 PM Last post by: vizskywalker |
|||
![]() |
5 | Vue | 1,011 | 17th April 2007 - 04:37 AM Last post by: patronus4000 |
|||
![]() |
2 | bluefish | 1,935 | 17th February 2007 - 03:07 AM Last post by: bluefish |
|||
|
Lo-Fi Version | Time is now: 8th November 2009 - 01:51 PM |
© 2009 AstaHost: Free Web Hosting & Technical Discussion, Free Web Hosting. a member of xisto.
Powered by Invision Board. Skin: IPB Forum Skins
Expand / Collapse Navigation



Aug 31 2008, 07:25 PM




