[eluser]Mizanur Islam Laskar[/eluser]
First of all, THANK YOU VERY MUCH INPARO, foryour quickest response. I applied URL Helper as your suggestions, but I'm in the same place. Let me make it more clear of what I'm suffering:
1) In the registration form, while I press TAB button without typing anything, I don't see any confirmation (like any positive/negative comments upon my typing).
2) If I type an email address that is not in MySQL, then it keeps saying that particular email is already in use. Also in the captcha field, even if I type the correct digits, it says that "Please type the Verification Code" .
My modified Controller(SignUp.php):
Code:
<?php
class SignUp extends Controller
{
function SignUp()
{
parent::Controller();
$this->load->helper('url');
}
function index()
{
$data=array();
$data['title']=':: Sign Up INBOOK.COM ::';
$data['metaTag1'] = "<meta name='keywords' c>";
$data['metaTag2'] = "<meta name='description' c>";
$this->load->model('inbook_model');
$data['main_menu'] = $this->inbook_model->show_main_menu();
$data['sub_menu'] = $this->inbook_model->show_sub_menu();
$this->load->view('SignUp',$data);
}
}
?>
A portion of my modified View(SignUp.php):
Code:
.......
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/styles/inner_page.css">
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/styles/milk.css">
<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/styles/chili.css">
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed][removed]
[removed]
if(jQuery)
{
$(document).ready(function() {
// validate signup form on keyup and submit
var validator = $("#signupform").validate({
rules: {
email: {
required: true,
email: true,
remote: "<?=base_url()?>assets/PHPforAjax/check_email.php"
},
password: {
required: true,
minlength: 6
},
password_confirm: {
required: true,
minlength: 6,
equalTo: "#password"
},
captcha: {
required: true,
minLength: 5,
remote: "<?=base_url()?>assets/PHPforAjax/check_captcha.php"
}
},
messages: {
email: {
required: "Please enter a valid Email Address",
minLength: "Please enter a valid Email Address",
remote: jQuery.format("{0} is already in use")
},
password: {
required: "Provide a password",
rangelength: jQuery.format("Enter at least {0} characters")
},
password_confirm: {
required: "Repeat your password",
minLength: jQuery.format("Enter at least {0} characters"),
equalTo: "Enter the same Password as above"
},
captcha: {
required: "Please type the Verification Code",
minLength: jQuery.format("Please type the {0}-digit Verification Code"),
remote: jQuery.format("Please type the Verification Code")
}
},
// the errorPlacement has to take the table layout into account
errorPlacement: function(error, element) {
if ( element.is(":radio") )
error.appendTo( element.parent().next().next() );
else if ( element.is(":checkbox") )
error.appendTo ( element.next() );
else
error.appendTo( element.parent().next() );
},
submitHandler: function() {
//alert("submitted!");
document.getElementById('signupform').submit();
},
// set this class to error-labels to indicate valid fields
success: function(label) {
// set as text for IE
label.html(" ").addClass("checked");
}
});
});
}
[removed]
......