This is third time and i want to make it clear for my problem. So in the first page i display my whole record that i saved in database, and when i want to view the selected details at second page, i need to click the selected data and view, but nothing happen and i have no idea how to link the VIEW to second page that can show all the data, i had capture down the pictures so that hope you all can help me, big thanks.
This is First page

This is the second page that i want to show the detail in the text field

The coding is like this (first page::to show the whole records and link to second page)
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>';
}
});
});
}
function loadRecord(i){
var item=dataset.item(i);
fname.value = item['fname'];
id.value = item['id'];
window.location.href="userup2.html?loadRecord("+i+")";
return false;
}
Please give me some idea and example, im using web sql to store data, i already ask this question for few times and im newbie for the html and javascript, please help me and this is important.
Yes you can achieve it using query strings. As I am not aware of web-sql, I will show you how to add query string to url in first page and how to retrieve it in second page.
JS CODE:
In the above function we are adding
i(id of one record) as query string.This code will help you to get the query string from url.
Example:
The above line will help you to get id that you passed in first page and you may use it to retireve the details from database.
Hope this helps you 🙂