.val() in ie

.val() in ie

the follow piece of code don't work in ie, and I don't know why.

I'm stucked with this. Ie throw a js error. It seems that it can't find the .val() method is not supported;

I tryed with the classic document.getElementById() but I find out the same error.

Someone could help me, please?

 

  1.  

    <

    script type="text/javascript">

    $

    ("#btn_filtra").click(function(){

    filtro

    =$('#filtro').val();

    tableName

    =$('#tableName').val();

    var url="lista_visualizzazione.php?tableName="+tableName+"&filtro="+filtro;

    $

    ("#lista").load(url);

    });

    $

    ("#btn_add_voce").click(function(){

    alert

    ("add_voce");

    // codice=$('#codice_da_ins').val();

    codice

    =document.getElementById('codice_da_ins').value;

    alert

    (codice);

    //descrizione=$('#descr').val();

    descrizione

    =document.getElementById("descr").value;

    alert

    (descrizione);

    tableName

    =$('#tableName').val();

    alert

    (tableName);

    var url="controller.php?cmd=save&codice="+codice+"&descr="+descrizione+"&tableName="+tableName;

    alert

    (url);

    $

    ("#messaggio").load(url,function(){

    $

    ("#btn_filtra").click();

    });

    });

    })

     

    </script>