Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

where from 2 lsv?

Hi Yurii,
I opted for the js on success of service but it had no effect still getting doubles, here is the implemtation and the result, any ideas why its not working?

Image Image Image

Best Regards

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

where from 2 lsv?

Hi Michael,

This time was my bad. I did not understand you clear.

In this case you need replace code inside "success" event handler with following:

pre

//Note you need replace "menugrid" with your select component name.
var items = jQuery('[name="menugrid"]')
var itemHash = {};
for(var i = 0; i < options&#46;length; i++){
var item = jQuery(items);
var itemText = item&#46;text()&#46;trim();
if(itemHash[itemText]){
item&#46;remove();
continue;
};
itemHash[itemText] = true;
};

/pre

Regards.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

where from 2 lsv?

No Yurri sorry be asking again,
still having a problem,
the array is mapped to the grid, which is called menugrid, changed js but getting error, tried the other components areaselectmenu and mobilelist_65 ( in case I misunderstood)

here are some screenshots using menugrid in the js code

Thanks for all of you help

Image

Image

Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

where from 2 lsv?

Michael,

N.p. please use following code:

pre

&#47;&#47;Note you need replace "menugrid" with your select component name&#46;
var items = jQuery('[name="menugrid"]')
var itemHash = {};
for(var i = 0; i < items&#46;length; i++){
var item = jQuery(items);
var itemText = item&#46;text()&#46;trim();
if(itemHash[itemText]){
item&#46;remove();
continue;
};
itemHash[itemText] = true;
};

/pre

Regards.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

where from 2 lsv?

Thank you Yurii for your attention and patience,
Perfect!
this will save me so much trouble with the additional advertisers and the monthly update of this app.

your attention and help has been awesome!

thanks again.

Return to “Issues”