Following is my json data URL http://bluestonesolutions.in/Connect4mJson/GetEmployees.svc/getnotice?InstanceId=604&EnoticeType=Flash%20News&UserID=112730&IsGlobalNotice=0
I want display data in table using jquery Mobile for Phonegap. I can fetch data easily but can display in mobile.
Here is working example. Please guide me how to parse it for phonegap
$(document).ready(function() {
$.ajax({
url : 'http://bluestonesolutions.in/Connect4mJson/GetEmployees.svc/getnotice?InstanceId=604&EnoticeType=Flash%20News&UserID=112730&IsGlobalNotice=0',
type : 'GET',
dataType : 'JSON',
crossDomain: true,
success : function(data) {
document.write('<table width="400" height="288" align="center" style="border:5px solid #10A3D8; ">')
$.each(data, function() {
console.log(this.Subject);
document.write('<tr style="background:#D4D2D2;" >')
document.write('<td style="color:#041DB3;">'+'Subject:-</td>')
document.write('<td style="color:#041DB3;">'+this.Subject+'</td>')
document.write('</tr>')
document.write('<tr style="background:#04A273;">')
document.write('<td>'+'Description:-</td>')
document.write('<td>'+this.ENoticeDescription+'</td>')
document.write('</tr>')
});
document.write('<table>');
// open console debugging tools on google and see the parse value
},
error : function() {}
});
});
document.write('') document.write('') document.write, what on Earth is that O_o This erases the whole document.