Note that there are some explanatory texts on larger screens.

plurals
  1. POcheckbox checked not getting picked up if made through jquery
    primarykey
    data
    text
    <pre><code> $("#submit_load").click(function() { var profilename =$("#search_profiles option:selected").attr("value"); var data='profilename='+profilename+'&amp;user_id=' + &lt;?=$user_id;?&gt;; alert(data); $.ajax({ //this is the php file that processes the data and send mail url: "getprofile.php", type: "POST", data: data, cache: false, success: function (html) { alert(html); var dia_info = html.split('~'); //$('#diamond_options')[0].reset(); var dia_id = $(':checkbox:checked.ds_nobg').map(function() { return this.id; }).get().join(','); alert("diatype----"+dia_id); // alert(dia_id.length); if(dia_id.length&gt;0) { var dia_id_arr = dia_id.split(','); for(var j=0;j&lt;dia_id_arr.length;j++) { var chk_id = dia_id_arr[j]; var diashape_chk = '#' + chk_id; var bg_id='#'+chk_id+'1'; var shape_id='#'+chk_id+'-1'; var shape_class_on=chk_id+'_1_on'; var shape_class_off=chk_id+'_1'; // alert(chk_id+'---'+diashape_chk+'---'+bg_id+'---'+shape_id+'---'+shape_class_on+'---'+shape_class_off ); // alert(dia_id_arr_sp[0]+'---'+dia_id_arr_sp[1]+'---'+diashape_chk+'---'+diashape+'---'+remclass+'---'+addcls+'---'+rembg ); // alert(diashape); $(shape_id).removeClass(shape_class_on); $(shape_id).addClass(shape_class_off); $(bg_id).removeClass('ds_bg_hi' ); $(bg_id).addClass('ds_nobg' ); $(diashape_chk).removeAttr('checked') ; if ($(shape_id).hasClass(shape_class_off)) { alert("helllo---"+j+"---"+shape_id); } } } if(dia_info[34].length&gt;0) { var dia_id_arr = dia_info[34].split(','); for(var l=0;l&lt;dia_id_arr.length;l++) { var chk_id = dia_id_arr[l]; var diashape_chk = '#' + chk_id; var bg_id='#'+chk_id+'1'; var shape_id='#'+chk_id+'-1'; var shape_class_on=chk_id+'_1_on'; var shape_class_off=chk_id+'_1'; if ($(shape_id).hasClass(shape_class_off)) { alert("ddddd---"+l+"---"+shape_id); } // alert(chk_id+'---'+diashape_chk+'---'+bg_id+'---'+shape_id+'---'+shape_class_on+'---'+shape_class_off ); $(shape_id).removeClass(shape_class_off); $(shape_id).addClass(shape_class_on); $(bg_id).removeClass('ds_nobg' ); $(bg_id).addClass('ds_bg_hi' ); $(diashape_chk).attr('checked', 'checked') ; if ($(shape_id).hasClass(shape_class_on)) { alert("eeee---"+l+"---"+shape_id); } } } }); }); </code></pre> <p>sorry fellas my bad on this problem ....as you can see I $('#diamond_options')[0].reset(); which was causing all the problems i have commented that an it all works....</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload