Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

call Anchor tag in the same page

I have a web page which has grid and below there is details section.
User can select one record in the grid and details section fills up with its details.

Now the issue is Grid can have any no of rows so currently when user selects one record, he has to scroll the page down to reach the details section.

I am thinking of putting some tag at the detail section and when user selects a record then using javascript or jquery I call some method and reach of this tag.
Vice versa for reaching to the top (or to the selected record in the grid)

I need would it be possible to do?
0
yadavdep
Asked:
yadavdep
1 Solution
 
Manoj PatilSr. Software EngineerCommented:
Hey check this code....
<!DOCTYPE html>
<html>
<body>

<p>
<a href="#C4">See also Chapter 4.</a>
</p>

<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>

<h2><a id="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 7</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 8</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 9</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 10</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 11</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 12</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 13</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 14</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 15</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 16</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 17</h2>
<p>This chapter explains ba bla bla</p>

</body>
</html>

Open in new window

0
 
MrunalCommented:
Hi
You can do it in many ways. but I found two ways better for user experience.

1. You can put one container with some specified height to your grid and apply scrolling functionality to this container. As a result if records goes further that specified height then automatically scroll will come and your details section will not get disturbed.

2. Another way is you can add simple link for each row in grid and instead of displaying details in details section you can show details in popup in JavaScript or jQuery.

Hope this helps you.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now