473,320 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Showing the correct row in viewable are after search

Hi all,

I'm looking for a way to actually show a selected row *in* the viewable
area on the screen.

Situation:
1. Large table with autoComplete search fuctionality
2. On clickin a button (or whatever) the correct row is located and
highlighted accordingly. (all fine so far)
3. In a large table the actual entry is not displyed in the viewable area.
I have to scroll to get there. Hardly userfriendly.

If it is possible, *how* do I go about showing the highlighted row *on
screen* without having to scroll to it?

TIA
F DCG
Jul 20 '05 #1
4 1201
VK
<a name="row999"><tr>...</tr></a>
and then:
document.location.hash = 'row999';
?
Jul 20 '05 #2
DU
F. Da Costa wrote:
Hi all,

I'm looking for a way to actually show a selected row *in* the viewable
area on the screen.

Situation:
1. Large table with autoComplete search fuctionality
2. On clickin a button (or whatever) the correct row is located and
highlighted accordingly. (all fine so far)
3. In a large table the actual entry is not displyed in the viewable
area. I have to scroll to get there. Hardly userfriendly.

IMO, it is always best to give an url along with a brief description.
If it is possible, *how* do I go about showing the highlighted row *on
screen* without having to scroll to it?

TIA
F DCG


Assuming
(...)
<tr id="idTargetTableRow" ...>...</tr>
(...)

then
document.getElementById("idTargetTableRow").scroll IntoView(true);
will scroll the viewport to make that row viewable. Tested and working
in MSIE 6 for Windows, Mozilla 1.7alpha, NS 7.1, K-meleon 0.8.1.

DU
Jul 20 '05 #3
DU wrote:
F. Da Costa wrote:
Hi all,

I'm looking for a way to actually show a selected row *in* the
viewable area on the screen.

Situation:
1. Large table with autoComplete search fuctionality
2. On clickin a button (or whatever) the correct row is located and
highlighted accordingly. (all fine so far)
3. In a large table the actual entry is not displyed in the viewable
area. I have to scroll to get there. Hardly userfriendly.

IMO, it is always best to give an url along with a brief description.
If it is possible, *how* do I go about showing the highlighted row *on
screen* without having to scroll to it?

TIA
F DCG

Assuming
(...)
<tr id="idTargetTableRow" ...>...</tr>
(...)

then
document.getElementById("idTargetTableRow").scroll IntoView(true);
will scroll the viewport to make that row viewable. Tested and working
in MSIE 6 for Windows, Mozilla 1.7alpha, NS 7.1, K-meleon 0.8.1.

Thx, works like a charm.
MSIE 5+ does not falter either.
DU

F DCG
Jul 20 '05 #4
VK wrote:
<a name="row999"><tr>...</tr></a>
and then:
document.location.hash = 'row999';
?


No, that would be invalid HTML. TR may be only the child
of TABLE, THEAD, TBODY or TFOOT. Valid and better would be

<table ...>
...
<tr ...>
<td ...><a name="row999" id="row999" ...>...</a></td>
<td ...>...</td>
...
</tr>
<tr ...>
<td ...><a name="row1000" id="row1000" ...>...</a></td>
<td ...>...</td>
...
</tr>
...
</table>
PointedEars
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sean Dockery | last post by:
Which is the following is correct? a) <form ... onSubmit="return checkData()"> b) <form ... onSubmit="return checkData();"> c) <form ... onSubmit="checkData()"> d) <form ......
2
by: c.anandkumar | last post by:
Hi All - I have some problems getting a small piece of javascript working correctly for Firefox. Here is what I am trying to do - 1. I have a form (like a search form) 2. I have many groups...
0
by: mairhtin o'feannag | last post by:
Hello, I have no idea how DB2 was intalled on this here winders box (I know it's at fixpack 5, only because I installed FP5). We are connecting to a database on a Linux box, and building a SP...
1
by: Andi Plotsky | last post by:
I have a subform where I dynamically change the SourceObject dependent upon the User's response to questions on the Main form. My problem is that the scrollbars do not show up on either the Main...
3
by: Mike Dee | last post by:
Hi, I'm having an issue with the status bar in Mozilla and Netscape showing that it is still waiting on the page to load even after it is finished. This problem does NOT occur with IE. In...
2
by: AVB | last post by:
We are working on a web services app and a windows form app. This is distrubited with .net ClickOnce and has been developed with 2.0 FrameWork and written in C#. I can search for the application...
7
by: underground | last post by:
I have a problem that I've spent countless hours on and I'm more than certain this is a obviuos issue to an expert but I am still learning. I have a paging script that I have modified to display a...
1
by: jasone | last post by:
Hi all, ive got a search working, as shown below... on the page i want to show how many records are returned, im sure this is pretty simple but cant really work it out. any help or advice...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.