javascript - OnClick event not working in google chrome and safari -


i have used onclick() javascript event in cake app. not work in google chrome , safari. here code

<select name="ovwear" >             <option>--select category--</option>             <?php             $i = 1;               foreach($styledetail $key=>$val) { ?>               <option onclick="catdetail(<?php echo $val['shop_style_categories']['cat_id'].",".$val['shop_style_categories']['parent_id'] ?>);" value="<?php echo $i;?>">category <?php echo $i;?></option>              <?php $i++; } ?>              </select> 

here function:

<script type="text/javascript">     function catdetail(cat_id,parent_id){         //alert("called here");         var cat_id = cat_id;         var parent_id = parent_id;             jquery.ajax({                           type: "post",                           url: "/admin/shop/styledata",                           data:"cat_id=" + cat_id,                           datatype: "html",                           success: function(data) {                             $("#alertt").html(data);                          }              });     } </script> 

onclick has on `<select` instead of `<option`  <select name="ovwear"  onclick=..... 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -