• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Urgent but Perfect help in jQuery and CI Integration

[eluser]Mizanur Islam Laskar[/eluser]
Hi, I'm new in CI. I need to integrate jQuery in CI (including remote script funtions for AJAX) for my current 2 projects. Can any expert help me with a proper and complete code-snippets?

For example, I need to develope an exact thing like http://www.simplypost.ca/register_step1.php, which is created from the scratch, but I need to develope it in CI now. Play with the link to know my reqirements perfectly, like type [email protected] in the Email Address field and press TAB. Again type another email like [email protected] and pess TAB....yes, remote scripts are responsible there for that unique-validity checking. Also type both correct/incorrect digits in Captcha field, type password less than 6 char, etc.

I went through the existing wikis in this site, but nothing could not give me a solution. Plz, I'm really need this very badly....Thanks

Quote:proper and complete code-snippets

You are asking a developer to create an ajax form for you without any sign you tried to come up with your solution. Try putting this in the job board and put a price on your urgency.

[eluser]Mizanur Islam Laskar[/eluser]
Sorry for the way of my requesting. Actually I'm too fustrated that I didn't get any way other than this for my emergency. Actually I already posted a thread on this : http://ellislab.com/forums/viewthread/83768/
There, I've illustrated my codes too (plz view my last code there), but failed to get any light on my target.
I think this will be a great help for other newbies like me who want to integrate jQuary in CI like me.....Thanks

In the other post you say you don't want to change the javascript but you are using php files to check the input remotely. these urls need to change to something like index.php/ajax/validation/email.

The tab keypress isn't the most userfriendly way to instantiate the validation as it will move the cursor a field down and if a users click on another field the validation will not happen until the user presses the submit button.

inparo gave you a good preset helping you out with the serverside code but i don't see how you want to integrate your previous code without changing your javascript code.

[eluser]Mizanur Islam Laskar[/eluser]
Yes, imparo really tried his best to help me out there, but I gave up there in my thread because he told me to make my all ajax-related scripts to work for GET request, because of CI's speial security mechanism....

I've already applied that url, but seems you didn't see that in my another thread:
email: {
    required: true,
    email: true,
    remote: "http://localhost/projects/inbook/index.php/SignUp/confirm_email"

Ok, forget about the TAB-related issue. I'll think about that later myself. Lets concentrate on this remote-scripting if you wish. BTB, I've also illustrated my controller funcion in that thread:

function confirm_email()
$email = $this->input->post('email');
$valid_email = $this->check_model->check_email($email);
echo ($valid_email == 0) ? 'false' : 'true';
But according to the CI manual, I also tried with
, but no improvement.

And here is my model function also:

function check_email($email)
$valid = 0;
$valid += $query->num_rows();
return $valid;

the validation plugin works with GET so your url will be http://localhost/projects/inbook/index.php/SignUp/[email protected] This means you can't use the input->post method. You have to use the input->get method. But this doesn't work without enabling query strings in your config.php file. And you need to change the uri_protocol setting to PATH_INFO because if it stays in the default auto protocol it eats up the key-value pair if there is only one, which is the case here.

[eluser]Mizanur Islam Laskar[/eluser]
Did all as you suggested, but end-up with the same result. Means, wether an email address in in DB or not, it always says that "The email address is already in use"...Don't know whats going on

I don't know the validation plugin well enough to be sure but it can be you need to output in a certain format. Did the false/true output did the trick in your older code?

[eluser]Mizanur Islam Laskar[/eluser]
Sure it did in http://www.simplypost.ca/register_step1.php
Plz open the link in Firefox and view all the internal/external JavaScript functionalities there

Try the link on it's own http://localhost/projects/inbook/index.php/SignUp/[email protected] to check the output.

First you need to pinpoint the moment something breaks before you can work out a solution and because you are working with server and client side code the points of breaking double.

If the url outputs the right text the problem lays with the validation plugin.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.