Okai, so I have this Ajax form that returns the data successfully and echoes it into #register_msg.
However I also wish to style the input forms, this is my Ajax code, followed by my form. For some reason it doesn't style the form. How come?
if(html.indexOf("Verification mail sent") > -1){
$("#register-wrap").html(html);
}
// FILL OUT FORMS
else if(html.indexOf("You need to fill out all forms.") > -1){
$("#register_msg").html(html);
$("#reg_fullname").css("-webkit-box-shadow: 0px 0px 14px 1px #FF0000; -moz-box-shadow: 0px 0px 14px 1px #FF0000; box-shadow: 0px 0px 14px 1px #FF0000;");
$("#reg_email").css("-webkit-box-shadow: 0px 0px 14px 1px #FF0000; -moz-box-shadow: 0px 0px 14px 1px #FF0000; box-shadow: 0px 0px 14px 1px #FF0000;");
$("#reg_password1").css("-webkit-box-shadow: 0px 0px 14px 1px #FF0000; -moz-box-shadow: 0px 0px 14px 1px #FF0000; box-shadow: 0px 0px 14px 1px #FF0000;");
$("#reg_password2").css("-webkit-box-shadow: 0px 0px 14px 1px #FF0000; -moz-box-shadow: 0px 0px 14px 1px #FF0000; box-shadow: 0px 0px 14px 1px #FF0000;");
$("#reg_register").val('<?php echo $database_reg_f_2; ?>');
}
HTML Form
<h1>Register</h1><br>
<div id="register_msg"></div>
<form method="POST"><br>
<input type="text" name="fullname" id="reg_fullname" /><br>
Email<br>
<input type="text" name="email" id="reg_email" /><br>
Password<br>
<input type="password" name="password1" id="reg_password1" /><br>
Repeat Password<br>
<input type="password" name="password2" id="reg_password2" /><br>
<input type="submit" name="register" value="register" id="reg_register" />
</form>
$("#register_msg").html(html);