ajax .append function not working on first click c# .net
-
terça-feira, 13 de março de 2012 16:38
Hi all,
The below code loads the content from the database and appends it to the destination but
in the first click the contents comes and goes off in a flash !!
and it works well from the second click
why is it happening ?!
function buddyproducts() { $(document).ready(function () { $.ajax({ type: "GET", url: "Handlers/Hbuddyproducts.ashx", contentType: "application/json; charset=utf-8", data: { intuserid: globaluserid }, dataType: "json", responseType: "json", success: Retbuddyproducts }); function Retbuddyproducts(result) { $("#destination").html(''); $("#destination").empty(); $.each(result, function (i, data) { var prodid = data.intproductid; var chvusername = data.chvusername; var chvproductimg = data.chvproductimg; var prdresult = "<li data-id='" + prodid + "' class='util'> <img src='" + chvproductimg + "' width='92' height='92' alt='' onclick='tretrieveproduct(" + prodid + ")'/> <span>" + chvusername + "</span></li>"; $("#destination").append(prdresult); }); } }); }
- Movido Neddy Ren quarta-feira, 14 de março de 2012 04:47 asp.net issue (From:Visual C# Language)
Todas as Respostas
-
quarta-feira, 14 de março de 2012 04:46
Hi,
You will need to post your questions to the http://forums.asp.net forum for more prefessiona supports. And I will help and move your thread to the off-topic forum. Thank you for understandings.
Best Regards
Neddy Ren[MSFT]
MSDN Community Support | Feedback to us

