question:

i have following code: why its not possible to write on this way in
the city.value?

$("#zip_code").blur(function(){

        var zip = "zip_code=" + this.value;
        $.get("?route=Adress/zipCityLookup", zip, function(xml){
-->            $("#city").value= $("city", xml).text();

        });
    });


When i has following code its possible to write on this way in the
zip_code.value
$("#zip_code").blur(function(){

-->            this.value="4563";

    });


Why i must use the .val() function?

$("#zip_code").blur(function(){

        var zip = "zip_code=" + this.value;
        $.get("?route=Adress/zipCityLookup", zip, function(xml){
-->            $("#city").val($("city", xml).text());

        });
    });

Reply via email to