¡@

Home 

2014/10/16 ¤W¤È 12:09:06

jquery Programming Glossary: storeid

jQuery ajax success anonymous function scope

http://stackoverflow.com/questions/1457690/jquery-ajax-success-anonymous-function-scope

scope How do I update the returnHtml variable from within the anonymous success function function getPrice productId storeId var returnHtml '' jQuery.ajax url includes unit.jsp params cache false dataType html success function html returnHtml html.. need to passin a callback to be called when the AJAX call succeeds. As an example of 2 function findPrice productId storeId callback jQuery.ajax url includes unit.jsp params cache false dataType html success function html callback productId storeId.. callback jQuery.ajax url includes unit.jsp params cache false dataType html success function html callback productId storeId html function receivePrice productId storeId html alert Product productId for storeId storeId received HTML html findPrice..