Hi,

I'm trying to use an ajax post request and not sure why is not working.


Code in a button:

$.post( "HTMLTestPage.htm",
        {
               employeeID: "007",
               requestType: "R"
        },
        function(xml){
                alert( xml );
                alert( "BankName = " + $("#BankName", xml).val() );             
                                
        }
);      


The 'HTMLTestPage.html' is an html page (not xml). When I click on the
button the first alert returns the whole page and I can see the source code,
id=BankName and value for the field, but the second alert returns an empty
string. I tried using the text() and html() function, but the outcome was
the same.

By the way, when I created a test button on the 'HTMLTestPage.html' with
'alert( $("#BankName" ).val()' it worked and I got the value displayed.

Any idea?


Any help is much appreciated, thanks.
-- 
View this message in context: 
http://www.nabble.com/Cannot-retrieve-%24.post%28-%29-response-tf2861724.html#a7996134
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to