asked on October 8, 2014

I find the way to popup a set of values from lookup rule( 3 records) with coding in stored procedure and fill them in a table. So I create a drop-down list for storing this set of value and I want it to hide form user.

When lookup rule fill data in the drop-drown list name "templist",I want the change event trigger and all the set of values from "templist" sent to the table.(It's column name "PCVList".)

My code is down here.

It only works when I click dropdown and select a value.

So I would like to known how can I make the change event happened without click the dropdown list.

Please give me some ideas.

Note : index of templist start from 1 because the first record of drop down = blank record.

 

$(document).ready(function () {
     
  $('.templist').on('change lookup',function(){
    var j=0;
    $('.PCVList input').eq(j).val($('.templist option').eq(1).val());
    for(var i=2;i<$('.templist option').length;i++)
      
      {      j++;
           $('#q18').trigger('click');
             $('.PCVList input').eq(j).val($('.templist option').eq(i).val());
            
           
      }

Regards,

Bongkoch

Screen_Preview_output.png
1 0