[ 5 posts ]

JohnG

  • Joined: Mon Oct 26, 2009 7:42 pm
  • Posts: 61
  • Offline
  • Profile

Autocomplete and io-form issue

Post Posted: Wed Apr 18, 2012 8:37 pm
+0-
Using 3.5.0, primarily node, autocomplete and io-form.
I am trying to use the auto-complete to assist in filling out a search form. This works great except when I try to submit the form which I am trying to use io-form to complete.
The issue is that io:complete triggers on every reply from the auto-complete fields.

I can work up some public test code if necessary.

thanks

Ryan Grove

YUI Developer

  • Username: rgrove
  • Joined: Tue Dec 09, 2008 9:55 pm
  • Posts: 275
  • Location: Portland, OR
  • Twitter: yaypie
  • GitHub: rgrove
  • Gists: rgrove
  • IRC: rgrove
  • YUI Developer
  • Offline
  • Profile

Re: Autocomplete and io-form issue

Post Posted: Thu Apr 19, 2012 8:39 am
+0-
I'm not sure I completely understand the problem, but if you can share some working code that reproduces it, I'd be happy to take a look.

JohnG

  • Joined: Mon Oct 26, 2009 7:42 pm
  • Posts: 61
  • Offline
  • Profile

Re: Autocomplete and io-form issue

Post Posted: Thu Apr 19, 2012 4:53 pm
+0-
I think the real issue is using datasource-io and io-form on the same page is causing the conflict.
I put some test code up here trying to reduce the number of variables.

Just type a "w" into the search or click the "search" button.
I have an alert trigger on the io:complete code.

I suspect IO:Complete does not care where the transaction was initiated.

JohnG

  • Joined: Mon Oct 26, 2009 7:42 pm
  • Posts: 61
  • Offline
  • Profile

Re: Autocomplete and io-form issue

Post Posted: Thu Apr 19, 2012 7:42 pm
+0-
Woo Hoo! I figured it out.
I needed to create a new instance of IO() for use with the form:
Code:
var myFormIO = new Y.IO();


Then use my new object instead of the global Y object.

So my send button does this
Code:
myFormIO.send(uri, cfg);

instead of
Code:
var request = Y.io(uri, cfg);


Seems to do what I need.
Hopefully I am on the right track.

Kevin Cota

  • Username: kevrsc
  • Joined: Sun Mar 11, 2012 2:30 pm
  • Posts: 1
  • GitHub: kevrsc
  • Gists: kevrsc
  • IRC: kevrsc
  • Offline
  • Profile
Tags:

Re: Autocomplete and io-form issue

Post Posted: Wed Jul 25, 2012 8:30 am
+0-
Thank you JohnG! I had the same problem until I discovered your post.
  [ 5 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum