> $(document).ready(function(){
>          $("select").change(getData);
>          function getData() {
>                  var idRep = $("#estados").val();
>                 alert($('repDesc').html()) // returns null (!!!!)
>                 $('repDesc').empty()
>                 alert($('repDesc').html())  // returns null (???)
>                 $.get("get_representantes.php?idRep="+idRep,  function(data){
>                          alert("Data Loaded: " + data); // show the correct 
> data
>                          $("repDesc").empty();
>                          $("repDesc").append(data);
>                          $("repDesc").after( data )
>                 });
>          }
>
> });
>
> and the html is very simple :
>
> <div id="repDesc">
>         <p id="repD_region">COSTA RICA</p>
>         <p id="repD_name">CALÇADOS BOTTERO LTDA.<br>Charles A. Werb</p>
>         <p id="repD_address">R. Armindo Schimidt, 676<br>CEP: 95630-000 -
> Perobé - RS<br>Fone<br></p>
> </div>
>
> if you want to see it live you can check 
> outhttp://www.bottero.net/iphone/rep_br.html
>
> TIA
> Marcelo Wolfgang


You're forgetting the # in your selectors:

$('#repDesc')


Reply via email to