i have created the login page for my web application using php, where i converted the result into json and grabed the list with jquery. Now my problem is that the list is a hyperlink to another page. So when user selects a name from the list, they should be redicted to another page and see all the information in ragards to that patient. But i dont know how i can grab and display the selected patient on another page.
Ideally i am thinking of creating another function which gets the json results from php file and saves it in an jquery array. Now when the user selects a patient. The id of the patient will then be compared with the one in the list, so if it matches up, then display everything related to that patient but on another page.
var url = 'http://brandon.walesalami.com/nurseD.php';
$.get(url,function (data){
//var renderHtml = '<div data-role="list-view"></div>';
var listView = $('<ol data-role="listview" data-inset="true"></ol>');
for (var i in data.patient)
{
var li = $('<li class="patientSel"><a href="#profile" class="' + data.patient[ i ].id + '">' + data.patient[ i ].name + '</a></li>').appendTo(listView);
}
$('#co').replaceWith(listView);
}, 'json');