emposha / FCBKcomplete

Jquery facebook like(fancy) multi-select
http://www.emposha.com
383 stars 115 forks source link

trigger addItem #72

Closed ti0rafa closed 12 years ago

ti0rafa commented 12 years ago

I just notice that if I used the following method:

$("#id").trigger("addItem",[{"title":vlu, "value":id}]);

Were id was a numeric value, it will load up an error in function xssDisplay.

I got it working but adding something like this:

function xssDisplay(string, flag) { string = string.toString(); // added line string = string.replace('\', ""); // this is were the error was ..... }

emposha commented 12 years ago

Hi @meltix, this is the second issue with same problem ;) so obviously that I need to handle it ;) Thanks for solution I will insert it in next version.

emposha commented 12 years ago

updated, please confirm

ti0rafa commented 12 years ago

Hey @emposha I just run a few tests and it worked good.

Thanks for the reply!

ti0rafa commented 12 years ago

Hey @emposha

I tested the new version on our production site, and Im seeing a weird $3 after every row...

The ajax return is: [{"key":"EUR","value":"EUR - Euro"}]

But in the input box shows "EUR - Euro$3"

This does not happens when I invoke the addItem function, but it does when I start typing and try to select an item. In my end nothing has changed.

ti0rafa commented 12 years ago

I would send you a screen shoot but I'm new to github.. i don't know if i can do that...

emposha commented 12 years ago

@meltix update to a newer version there already a fix for this problem

ti0rafa commented 12 years ago

@emposha

I'm using "jquery.fcbkcomplete.min.js" and is still has the same problem.

The other one "jquery.fcbkcomplete.js" its ok.

emposha commented 12 years ago

yep, min.js was outdated, currently updated, sorry for it.