Goede dag cp leden ik ben bezig met een register script in javascript maar hij doet alles goed behalve 1 klein ding
PHP
$(document).ready(function()
{
$("#register_form").submit(function()
{
//remove all the class add the messagebox classes and start fading
$("#aangemeldtekst").removeClass().addClass('messagebox_form').text('Account aan maken').fadeIn(1400);
//check the username exists or not from ajax
$.post("register/ajax_register.php",{ user_name:$('#username').val(),pass:$('#pass').val(),pass2:$('#pass2').val(),mail:$('#mail').val(),mail2:$('#mail2').val(),regels:$('#regels').val(),rand:Math.random() } ,function(data)
{
if(data=='yes') //if correct login detail
{
$("#aangemeldtekst").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Je bent zojuist aangemeld <?=$_POST['username'];?> Acctiveer je mail').addClass('messageboxok_form').fadeTo(900,1,
function()
{
//redirect to secure page
});
});
}
else
{
$("#aangemeldtekst").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('Je kon je niet aan melden probeer het opnieuw...').addClass('messageboxerror_form').fadeTo(900,1);
});
}
});
return false; //not to post the form physically
});
//now call the ajax also focus move from
$("#register_form").blur(function()
{
$("#register_form").trigger('submit');
});
});
Toon Meer
Hij laat de ingevoerde naam niet zien bij de melding