Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:26:49+00:00 2026-06-07T05:26:49+00:00

This is third time and i want to make it clear for my problem.

  • 0

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 First page

This is the second page that i want to show the detail in the text field
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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:26:50+00:00Added an answer on June 7, 2026 at 5:26 am

    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:

    function loadRecord(i){ 
        var item=dataset.item(i); 
        fname.value = item['fname']; 
        id.value = item['id']; 
        window.location.href="userup2.html?id="+i; 
        return false; 
    } 
    

    In the above function we are adding i (id of one record) as query string.

    function getUrlVars()
    {
        var vars = [], hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for(var i = 0; i < hashes.length; i++)
        {
            hash = hashes[i].split('=');
            vars.push(hash[0]);
            vars[hash[0]] = hash[1];
        }
        return vars;
    }
    

    This code will help you to get the query string from url.

    Example:

    var id = getUrlVars()["id"];
    

    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 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

THIRD EDIT: I now believe that this problem is due to a SOAP version
first of all this is my third question about web services here and i
I have a third party web service that returns this xml <book> <release_date>0000-00-00</release_date> </book>
I have some third-party Javascript that has statements like this: FOO = function() {
I want to display several images with varying intervals, for the time, i can
I suppose the answer to this will be no, but I want to make
I have a situation where I want to make a request to third-party API(url
First of all, I want to be clear: I did manage to get Internet
Third try at fixing this tonight - trying a different approach than before now.
I hate to be the third person to ask this, but the previous two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.