09-24-2007, 10:45 PM
|
#2 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
It looks like you're wanting to use an XMLHttpRequest in JavaScript to talk to a PHP script on your server. The PHP script will then check the database to see if the username exists and report back accordingly. Then the JavaScript will parse the response and change the innerHTML of the spans as appropriate. Or, in a more concise form, you're wanting to do an AJAX call.
I don't know your level of knowledge in this area but just let me say that if you're looking for a way for JavaScript (and only JS) to talk to the database, then you can't. But that doesn't mean the process is difficult.
Since it makes the process a whole lot easier, can I ask if you have any experience with JavaScript frameworks (jQuery, Prototype, Mootools...) and if so which one(s)? For the sake of simplicity, it would probably be easier to guide you through your problem using one of the frameworks (that's their purpose, to make things easier!).
|
|
|
|