Javascript & Jquery why it doesnt work on IE?

Posted by Yetkin EREN on Stack Overflow See other posts from Stack Overflow or by Yetkin EREN
Published on 2010-04-07T19:41:14Z Indexed on 2010/04/07 19:43 UTC
Read the original article Hit count: 308

i cant run any function on ie this is a little part;

my test page : http://www.yetkineren.com/testpage.html

code:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<title>test page</title>
</head>

<body>


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js">
</script>
<script type="text/javascript" language="javascript">

function kutuyap(Eid,iduzan,yazi,yer,ekle){

    var div;
    div = document.createElement('div')
      div.id = Eid+iduzan;
      document.getElementById(yer).appendChild(div);
     //$('#'+yer).append("<div id="+Eid+iduzan+"></div>")


     $('#'+Eid+iduzan).addClass("minikutu");
     $('#'+Eid+iduzan).html(" "+yazi+'<span id='+Eid+'y'+iduzan+' class="yokedici">X</span>');
    //   $("#"+Eid+'y'+iduzan).attr("onclick","kutusil('"+Eid+"y"+iduzan+"','"+iduzan+"','"+ekle+"');");
$("#"+Eid+'y'+iduzan).click(function() {
     kutusil(Eid+'y'+iduzan, iduzan, ekle);
 });

 $('#'+ekle).val($('#'+ekle).val()+Eid+'-');

}

function kutusil(Eid,iduzan,ekle){
$('#'+Eid).live('click',function() {
    sil=$(this).parents("div:first").attr("id");
    silinecek=sil.replace(iduzan,'');
    $('#'+ekle).val($('#'+ekle).val().replace(silinecek+'-',''));
    $(this).parents("div:first").remove();
});
}
</script>

  <select name="Mturs" class="inputs" id="Mturs">

    <option value="0" selected="selected">Choise One</option>
    <option value="4">Pop</option>
    <option value="3">Pop-Rock </option>
    <option value="5">Rock (Yabanci)</option>

  </select>

<input name="secMtur" id="secMtur" value="" type="hidden">

 <script>
 $('#Mturs').live('change', function() {

 $('#Mturs :selected').each(function (i) {

          if ( $('#Mturs :selected').val() != 0 ) {

 secMturde=$('#secMtur').val().indexOf($('#Mturs :selected').val()+'-');

splitter=$('#secMtur').val().split("-")
if(splitter.length<=12){

if (secMturde<0) {
 kutuyap($('#Mturs :selected').val(),'mtur',$(this).html(),'divmtur','secMtur');
 }else{
   alert("Choisen before")
 }

 }else{
     alert("Max limit is 12 !")
   }

}
});
});
 </script>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript