hey guys i have question of displaying data with html in different page, it mean when i get data from web sql in the first page, then i click the data i want to edit and it link me to another page, so how can i do that? i test before with but it just redirect to that page and didn't show the selected data, so how am i suppose to do that, do anyone have the solution? big thanks.
The link below is my html page of display data in one page, hope you all can help me, big thanks. Here is my work (display data)
function showRecords(){
results.innerHTML='';
db.transaction(function(tx)
{
tx.executeSql(selectAll,[],function(tx,result)
{
dataset = result.rows;
for(var i=0,item=null;i<dataset.length;i++)
{
item = dataset.item(i);
results.innerHTML+=
'<li>' + item['fname'] + ' <a href="#" onclick="loadRecord('+i+')">view</a>'+'<a href="#" onclick="deletetab('+item['id']+')">delete</a>'+'</li>';
}
});
});
}
This is the code to show the records, but i want to show the selected records different page and edit, then update, mean that i click the view link then will redirect me to the other page and show all information of the select data, so what the best way? i got no idea since im new on this
function loadRecord(i){
var item=dataset.item(i);
fname.value = item['fname'];
id.value = item['id'];
}
This my loadRecord, i think i need to edit this so that when i redirect to another html it can show the data, is it possible? please let me know, big thanks