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

  • SEARCH
  • Home
  • 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 9191275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:38:45+00:00 2026-06-17T20:38:45+00:00

In table I have 1 column in which text-box is given so that user

  • 0

In table I have 1 column in which text-box is given so that user can edit text in that as per their need ,edited text is getting saved onkeyup properly but i want to hide text-box border ,or i can say after editing text text-box should not be visible ,only the edited text should be visible ,and if user again wants to edit than user should be able to see that text-box when user click on text again,something like this I want textbox effect like this,and i don’t want to use jquery,how can i do this

here is my code for textbox

echo "<td ><input id={remark{$j}}  type=\"text\"  onkeyup=\"writeremark(this.id,{$data_set1['eid']},{$emprid});\" value=\"{$data_set1['remark']}\" /></td>";

onkeyup function

function writeremark(e,eid,emprid) {
    var val=document.getElementById(e).value;
    var dataString = 'eid='+eid +'&emprid='+emprid +'&val='+val ;
    $.ajax({
        type:"POST",
        url: "updateremark.php",
        data: dataString,
        success: function(result){
      }
    });
}
  • 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-17T20:38:46+00:00Added an answer on June 17, 2026 at 8:38 pm

    To Hide the Border you can use Javascript. onblur event is what you need, onblur means when you remove focus from this input, either by clicking outside of it, or by pressing TAB to give focus to another element.

    <input type="text" id="myInput" onblur="HideBorder()" onfocus="ShowBorder()" />
    
    function HideBorder()
    {
       var myInput = document.getElementById("myInput").style;
       myInput.borderStyle="none";
    }
    

    Then when the user clicks back on it, you can use onfocus.

    function ShowBorder()
    {
       var myInput = document.getElementById("myInput").style;
       myInput.borderStyle="solid";
    }
    

    UPDATE

    <input type="text" id="myInput" onblur="HideBorder(this.id)" onfocus="ShowBorder(this.id)" />
    
    function HideBorder(id)
    {
       var myInput = document.getElementById(id).style;
       myInput.borderStyle="none";
    }
    

    As Fiona T suggested, you can do this in CSS (better solution).

    Give your input a class.

    <input type="text" class="myInput" />
    

    Then in CSS:

    .myInput
    {
       border-style:none;
    }
    .myInput:hover
    {
       border-style:solid;
    }
    .myInput:focus
    {
       border-style:solid;
    }
    

    However, I suggest that you don’t hide and show the border, because the size of the input may vary, you are technically removing the border which would be 1px,2px,3px…

    So change the color instead of that, if your background is white, then…

    .myInput
    {
       border-color:#FFFFFF;
    }
    .myInput:hover
    {
       border-color:#000000;
    }
    .myInput:focus
    {
       border-color:#000000;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table articles that has a column company which has list of
In Oracle, I have a table with a column (X) which can have strings
How can I have a column in a table which records the time which
I have a table called Event. A column has duration--which is...how long that event
I have a table which I need to track items that are returned for
I have a textbox which is binded to a specific database table column. This
I have a table in which a column stores image src which is in
In a table column I have check boxes which gives me indicator whether i
I have a table in Oracle where one of the column contains UserIds which
I have a table which has a column called Direct of type char(1). It's

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.