c# - Pnotify Post message via webservice -
i'm new programming world of jquery. trying data web service viewed on notification via pnotify. however, on each page load script not view notification bar. don't understand i'm doing wrong. hope can help.
note: web service retrieve data correctly in json format.
updated: able msg.d retrieves json not parse information how to.
<script type="text/javascript"> $(function () { $.ajax({ //data request type: 'post', url: 'webservices.asmx/getnote', contenttype: "application/json; charset=utf-8", datatype: 'json', success: function (msg) { $.pnotify({ //call pnotify title: msg.notetitle, text: msg.notetext }); } }); }); </script>
i reviewed code , if following should able data need. need aware object need parsed before passing array view. in case didn't that.
success: function (msg) { var obj= eval(msg["d"]); or // $.parsejson(msg["d"]) method evaluate json $.pnotify({ //call pnotify title: obj["0"].notificationtext, // pared arrays text: obj["0"].notificationdescription
Comments
Post a Comment