0

I have a page add offers through it i added asmSelect to add the customers for this offer. this is ok

but in the other hand, i need to edit this offer, so in the edit page , and in asmListItem i need to have the already selected customers saved in database for this offer.

how can i add values( taken from query result or hidden field) to asmListItem li this some code: $(document).ready(function() {

        $("#customers").asmSelect({
            addItemTarget: 'bottom',
            animate: true,
            highlight: true,
            sortable: true

        }).after($("<a href='#'>Select All</a>").click(function() {
            $("#customers").children().attr("selected", "selected").end().change();
            return false;
        })); 


    }); 

what i need is in .asmListItem to fill the li with values from hiddem field

nour
  • 15
  • 4

1 Answers1

0

not sure this is what you asked.. if not be more precise on your question (and the tags you use), and show some code.

$('.asmListItem li').data( $('#yourhiddenfield).val() );
Rufinus
  • 29,200
  • 6
  • 68
  • 84