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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:49:27+00:00 2026-06-16T22:49:27+00:00

Is it possible to select a row after page reload? I try to get

  • 0

Is it possible to select a row after page reload?

I try to get this effect: http://jsfiddle.net/yg4n6/2/ I mean that the user can get the row highlight when he clicks. But the problem comes when I have to reload the page to do other things with php. The row selected is the same of the id.

<tr>
    <td> <a href="?id=<?php echo $row['id'] ?>">
    <input type="text" name="num" value="<?php echo $row['id']?>"/>
    </a> </td>

    <td><input type="text" name="a" value="<?php echo $row['a']?>"/></td>
    <td><input type="text" name="b" value="<?php echo $row['b']?>"/></td>
</tr>
  • 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-16T22:49:28+00:00Added an answer on June 16, 2026 at 10:49 pm

    Each page reload is a new instance of the page from the server. So In case you want to save a state of your webpage, you will have to save it in some form like hidden fields or querystring. You cannot else do that with javascript.

    What you do with javascript is on client side and server is not aware of that in anyway.

    For your case you can do this. Assuming your rows are echo’d by php you can use this solution. $row['id'] being the id of the row in the resultset iteration.

    <?php
    $row = $_GET["id"];
    ?>
    <tr>
    <td> <a href="?id=<?php echo $row['id'] ?>">
    <input type="text" name="num" value="<?php echo $row['id']?>"/>
    </a> </td>
    
    <td><input <?php if($row['id'] == $row) echo 'class="highlight"'; ?> type="text" name="a" value="<?php echo $row['a']?>"/></td>
    <td><input <?php if($row['id'] == $row) echo 'class="highlight"'; ?> type="text" name="b" value="<?php echo $row['b']?>"/></td>
    

    Hope it helps…

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

Sidebar

Related Questions

Is it possible to select the whole folder in VB.NET open dialog box? By
Hello is it possible to select custom address after geocoding? Like in image below?
Is it possible to put focus back on a gridview row after that a
Possible Duplicate: Best way to get identity of inserted row? So lets imagine I
Possible Duplicate: Retrieve inserted row ID in SQL Is there any way to get
Possible Duplicate: How to select first row of the first table in an html
Possible Duplicate: Get generated id after insert I want to get the last inserted
I'm not sure if this is even possible after trying to figure it out
i have a question on stored procedures. I try to get a page of
Is it possible to get the row index of a DataTable so that you

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.