views:

114

answers:

0

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"&gt;
</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 (Yabancı)</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>

Solved: change does not bubble in IE, It wasn't until jQuery 1.4.2 that jQuery faked out a working bubbling change event. Sorry about that. – Crescent Fresh