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 3997310
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:23:10+00:00 2026-05-20T07:23:10+00:00

I just started to develop web. I am currently stuck in a question not

  • 0

I just started to develop web. I am currently stuck in a question not sure how to solve it.

I have 2 pages, one for me to enter the product name and the price of it. After I click the save button, it will save to the database, after successfully save the data, it load back the page for me to continue enter the data. When I click the report button I will go to the report page (Here is where the question starts.) I can see the table with colums and rows nicely displayed with the data: product name and price. What I would like to do here is to edit the data as I like. I click on the product it will change to the textbox and still keeps the data inside textbox, (meaningly, it won’t be readonly anymore). The same to the price. What I previously did was: each row I have the check box, click on the checkbox, I will use the jquery something like this to change.

$("input[name^='chk']").click(function() {
        $("input[name^='chk']").each(function() {
        if($(this).is(':checked')) {
            var i = $(this).val();
            $("#cost"+i).attr('readonly', false);
            $("#qty"+i).attr('readonly', false);
        }else{
            var i = $(this).val();
            $("#cost"+i).attr('readonly', true);
            $("#qty"+i).attr('readonly', true);
        }
        }); 
    });

But what I do not want now is do not display the data inside the textbox even in the beginning. Click on it, then it only will change to textbox. And I also do not wish to have the checkbox also. It makes my page look ugly. I’ve seen this way in several websites, but I don’t know how to do it. If anyone can help me out to this, I really appreciate your help

  • 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-05-20T07:23:11+00:00Added an answer on May 20, 2026 at 7:23 am

    You can hide and show elements by using jQuery. Just put both the textbox and the displayed data on the page, and then hide the textboxes using jQuery’s .hide(). When the user clicks on the displayed data, you can hide the data and show the textbox with .show() in the click function you define in the element’s .click().

    Another alternative is to dynamically insert the textboxes after user clicks on the displayed data, using for example .html() in jQuery.

    You’ll need to study the jQuery documentation a while to get something like this done, but it’s quite easy once you get the hang of it.

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

Sidebar

Related Questions

Just started designing a database which I have not done before. And am wondering
Just started learning C# (in xaml), so appreciate some elaboration: ((MSAvalon.Windows.Serialization.ILoaded)(_Text_2_)).DeferLoad(); Not sure what
Have just started using Google Chrome , and noticed in parts of our site,
I just started thinking about creating/customizing a web crawler today, and know very little
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I just started using SVN, and I have a cache directory that I don't
Recently I just got assigned a project to develop a web application/site that uses
So i just started trying to develop a simple webpart today for a sharepoint
I am just dipping my hands into web technologies. I started with HTML and
I have started using Python for web development recently, it's kinda cool; I have

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.