android - Javascript function is not calling on mobile -


i have script function , working on laptop not calling on mobile (checked on androids only). not displaying simple alert message.

what can reason this?

this link:

 <a href="javascript:void(0)"               onclick="doit(id='<?php echo $results[$i]->id; ?>', color = '<?php echo get_post_meta($pid, 'color', true);?>',color2='<?php echo get_post_meta($pid, 'color2', true);?>',                   unit_size='<?php echo get_post_meta($pid, 'unit_size', true);?>', unit_size2='<?php echo get_post_meta($pid, 'unit_size2', true);?>',col_unit_gst='<?php echo get_post_meta($pid, 'col_unit_gst', true);?>',                   col_unit_xgst='<?php echo get_post_meta($pid, 'col_unit_xgst', true);?>',col2_unit2_xgst='<?php echo get_post_meta($pid, 'col2_unit2_xgst', true);?>',                   col2_unit2_gst='<?php echo get_post_meta($pid, 'col2_unit2_gst', true);?>')" value="<?php echo $results[$i]->id;?>" class="mycls<?php echo $pid;?>"><button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#mymodal">for price</button></a> 

here function created

            <!-- modal content-->             <div class="modal-content">                 <div class="modal-header">                     <button type="button" class="close" data-dismiss="modal">&times;</button>                     <h4 class="modal-title">price list</h4>                 </div>                 <div class="modal-body">                     <script language="javascript">                         function doit (id='', color = '',color2='', unit_size='', unit_size2='',col_unit_gst='', col_unit_xgst='',                                        col2_unit2_xgst='', col2_unit2_gst=''){                              alert('yes here');                             document.getelementbyid('color').innerhtml = color;                             document.getelementbyid('unit_size').innerhtml = unit_size;                             document.getelementbyid('col_unit_gst').innerhtml = col_unit_gst;                             document.getelementbyid('col_unit_xgst').innerhtml = col_unit_xgst;                             /* document.getelementbyid('id').innerhtml = id; */                             document.getelementbyid('color2').innerhtml = color2;                             document.getelementbyid('unit_size2').innerhtml = unit_size2;                             document.getelementbyid('col2_unit2_xgst').innerhtml = col2_unit2_xgst;                             document.getelementbyid('col2_unit2_gst').innerhtml = col2_unit2_gst;                          }                     </script>                    <div class="ratelist-heading">                  <ul class="head">                  <li>colour                  </li>                  <li>unit size                  </li>                  <li>ex.gst                  </li>                  <li>incl.gst                  </li>                  </ul>                   <ul class="ratelist">                  <li><p style="float: none;" id="color"></p> <p style="float: none;" id="color2"></p></li>                  <li><p style="float: none;" id="unit_size"></p> <p style="float: none;" id="unit_size2"></p></li>                  <li><p style="float: none;" id="col_unit_xgst"></p> <p style="float: none;" id="col2_unit2_xgst"></p></li>                  <li><p style="float: none;" id="col_unit_gst"></p> <p style="float: none;" id="col2_unit2_gst"></p></li>                  </ul>                    </div>                     </div>                 <div class="modal-footer">                     <button type="button" class="btn btn-default" data-dismiss="modal">close</button>                 </div>             </div>          </div>     </div> 

update: not working in internet explorer 11. seems browser compatibility issue.

have checked if javascript allowed in phone browser? go settings , check if allows javascript , otherwise if doesnt allow wont play code.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -