IE 8: Object Expected for Every Javascript Function
        Posted  
        
            by Yetkin EREN
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Yetkin EREN
        
        
        
        Published on 2010-04-07T17:48:00Z
        Indexed on 
            2010/04/07
            18:13 UTC
        
        
        Read the original article
        Hit count: 370
        
jQuery
Hi;
Moz say's everything is ok! IE say's object expected everywhere..
for example this my make a box function (in all.js file);
function kutuyap(Eid,iduzan,text,yer,ekle){
var div;
 if (document.createElement && (div = document.createElement('div'))) {
  div.name = div.id = Eid+iduzan;
  document.getElementById(yer).appendChild(div);
  }
 //$('#'+yer).append("<div id="+Eid+iduzan+"></div>")
 $('#'+Eid+iduzan).addClass("minikutu");
 $('#'+Eid+iduzan).html(" "+text+'<span id='+Eid+'y'+iduzan+' class="yokedici">X</span>');
    $("#"+Eid+'y'+iduzan).attr("onclick","kutusil('"+Eid+"y"+iduzan+"','"+iduzan+"','"+ekle+"');");
 $('#'+ekle).val($('#'+ekle).val()+Eid+'-');
}
and after that i call function like this;
HTML;
  <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>
sory for my realy bad english..
edit: and i have this tags;
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js">
</script>
<script type="text/javascript" src="alljs.js"></script>
© Stack Overflow or respective owner