Page 3 of 3

where from 2 lsv?

Posted: Mon Aug 11, 2014 8:56 pm
by Michael4771079

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


where from 2 lsv?

Posted: Tue Aug 12, 2014 1:30 am
by Yurii Orishchuk

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.


where from 2 lsv?

Posted: Tue Aug 12, 2014 2:12 am
by Michael4771079

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


where from 2 lsv?

Posted: Tue Aug 12, 2014 3:03 am
by Yurii Orishchuk

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.


where from 2 lsv?

Posted: Tue Aug 12, 2014 3:17 am
by Michael4771079

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.