I checked your code three times and couldn't point out where the error was so here's another solution to this. I hope this one solves it.
open ajax_checkusername.js and replace:
Code:
submit = document.register.submitform;
with
Code:
submit = document.getElementById('submitform');
and change (in the template 'register') this:
Code:
<div style="margin-top:$stylevar[cellpadding]px"><input type="submit" class="button" value="$vbphrase[complete_registration]" accesskey="s" name="submitform" /><input type="reset" class="button" name="Reset" value="$vbphrase[reset_fields]" />
to this:
Code:
<div style="margin-top:$stylevar[cellpadding]px"><input type="submit" class="button" value="$vbphrase[complete_registration]" accesskey="s" id="submitform" /><input type="reset" class="button" name="Reset" value="$vbphrase[reset_fields]" />
Please try that and tell me if it's working
__________________________________________________ ___
Here's another solution that came up after some google searches.
Open ajax_checkusername.js and replace:
Code:
function checkName(input, response)
{
if (response != ''){
// Response mode
message = document.getElementById('nameCheckFailed');
submit = document.register.submitform;
if (response == 1){
message.className = 'registererror';
submit.disabled = true;
}else{
message.className = 'registererrorhidden';
submit.disabled = false;
}
}else{
// Input mode
url = 'register.php?do=checkusername&username=' + input;
loadXMLDoc(url);
}
}
with:
Code:
function checkName(input, response)
{
if (response != ''){
// Response mode
var message = document.getElementById('nameCheckFailed');
var submit = document.register.submitform;
if (response == 1){
message.className = 'registererror';
submit.disabled = true;
}else{
message.className = 'registererrorhidden';
submit.disabled = false;
}
}else{
// Input mode
url = 'register.php?do=checkusername&username=' + input;
loadXMLDoc(url);
}
}
This error seems pretty strange to me since the same code is working fine for me