CodeIgniter Forums

Full Version: Need Urgent but Perfect help in jQuery and CI Integration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3

El Forum

[eluser]Mizanur Islam Laskar[/eluser]
YESSS...the URL with a non-existing email outputs "false" and shows "true" for an existing one. Therefore, I came to know that my functions both for model and controller are working fine. Also according to this, your below statement gets valid:

Code:
If the url outputs the right text the problem lays with the validation plugin

But if it is, means, if the plugin get problems, then it should not work for any scratch-level codings too, right? Then why my http://www.simplypost.ca/register_step1.php is working out there?

El Forum

[eluser]xwero[/eluser]
So there is nothing wrong on the php side. Now there should be a reason why the validation plugin only returns the email exists error. From now on it would be purely guess work as i don't know how the plugin works and what the quirks are.

I suggest you open the firebug window and see what happens in the console tab. If the url gives errors the problem lays there. if the responce is more than the word true/false that could be the problem.

El Forum

[eluser]Mizanur Islam Laskar[/eluser]
OK.....thanks you both (you and Imparo) very much for trying to help me out there. I'm trying to get a solution on my own and I MUST create my 3rd thread on my success with all my code-snippets for free, wishing only that many newbiews will get help on this.thanks again

El Forum

[eluser]Randy Casburn[/eluser]
@xwero, @Imparo -- What this fello forgot to disclose was that there was a bunch of event manager code in the page he wanted to slurp from. Since he never mentioned that, it wasn't clear how the 'onBlur' was being handled. So here is the code from that page that will make his magic work:

@Mizanur Islam Laskar -- put this code into your page and the jQuery validation will work as you expected it to...


Code:
< script language="JavaScript1.2" type="text/javascript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent;.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d;.all) x=d.all[n]; for (i=0;!x&&i;<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d;.layers&&i;<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
  if (event == "init" && args.length > 2) {
    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
      img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
      nbArr[nbArr.length] = img;
      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
        if (!img.MM_up) img.MM_up = img.src;
        img.src = img.MM_dn = args[i+1];
        nbArr[nbArr.length] = img;
    } }
  } else if (event == "over") {
    document.MM_nbOver = nbArr = new Array();
    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up);
      nbArr[nbArr.length] = img;
    }
  } else if (event == "out" ) {
    for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
  } else if (event == "down") {
    nbArr = document[grpName];
    if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
    document[grpName] = nbArr = new Array();
    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
      if (!img.MM_up) img.MM_up = img.src;
      img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
      nbArr[nbArr.length] = img;
  } }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a>

El Forum

[eluser]louis w[/eluser]
MM_preloadImages, I threw up a little just looking at that JS.

El Forum

[eluser]AgentPhoenix[/eluser]
Ahh Dreamweaver JS. It never dies, does it?

El Forum

[eluser]Mizanur Islam Laskar[/eluser]
Hey Randy, first of all, thank you for trying to help me there. This fello (lol, its me) illustrated all the neccessary codes at the begining of this thread. The script you suggested me for my problem, is pasted from http://www.simplypost.ca/register_step1.php, right?

Plz visit the link again and wait for complete loading. After that, move you mouse over those large 5 red buttons (Home, Post Ad, My Account, etc.) and 2 bluish buttons (Register, Sign In) right to them. You see any mouse-over effects?...yes, the srcipt you gave me is ONLY responsibile for those effects.

You can also visit here to see from where I took help to implement the AJAX effect in http://www.simplypost.ca/register_step1.php

El Forum

[eluser]Randy Casburn[/eluser]
Well hell, now I understand xwero's very first post! You know the one about..well, never mind, my bad. I really missed the boat on this one.

jQuery Remote validator works like a charm in CI though. And the following code from your source has the whole validate on the tab thing working just great...
Code:
onfocusout: function(element) {
if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
this.element(element);
}
},
onkeyup: function(element) {
if ( element.name in this.submitted || element == this.lastElement ) {
this.element(element);
}
},

All those skills you've got should be up and running in no time.

Randy

El Forum

[eluser]Mizanur Islam Laskar[/eluser]
Yes I beleive that I've those powerfull scripts, which helped me running from the scratch-level of coding, but then why its not working in CI?

According to xwero’s suggestion, I did everything to get values from GET request in CI,but I'm stuck in the same ground.

El Forum

[eluser]Randy Casburn[/eluser]
It does work in CI. It took me about 12-14 minutes - works great. Slurped everything off your sight to test it for you and had it up and running. Then I threw it all away cause it didn't need it for anything.

Don't think it's a CI problem you're having. Post up a link to your CI version and let's have a look. If it turns out to be a JS problem, as I suspect it is, we'll vector you over to the jQuery boards where you can get them to do your work for you.
Pages: 1 2 3