473,405 Members | 2,354 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,405 software developers and data experts.

Loading to specific point on page

Hello

I have a datalist on a webpage which initially displays
all the entries in the item view mode. When I select an
item to edit it reloads the page and displays the selected
item in the edit view. The problem I have with this is
that it reloads the browser window displaying the top of
the form. This is fine for an entry at the top of the
grid but if it is towards the bottom the user has to
scroll down the list to the appropiate item. Is their way
to reload the page without it going back to the top of the
page. Or is it best to reorder my grid displaying the
selected item as the first in the list. If so how do I do
this?

Thanks

David
Nov 17 '05 #1
3 1272
Two techniques I have seen, although I don't know the full extent on browser
compatibility. One is to turn Smart Navigation on, and let IE take care of
keeping the page location. The other is to use the
Page.RegisterStartupScript to send a snippt of javascript that sets the
focus on a particular control.

--
James J. Foster, DotNetCoders
http://www.dotnetcoders.com
"David" <ce****************@nospam.com> wrote in message
news:01****************************@phx.gbl...
Hello

I have a datalist on a webpage which initially displays
all the entries in the item view mode. When I select an
item to edit it reloads the page and displays the selected
item in the edit view. The problem I have with this is
that it reloads the browser window displaying the top of
the form. This is fine for an entry at the top of the
grid but if it is towards the bottom the user has to
scroll down the list to the appropiate item. Is their way
to reload the page without it going back to the top of the
page. Or is it best to reorder my grid displaying the
selected item as the first in the list. If so how do I do
this?

Thanks

David

Nov 17 '05 #2
Jos
James J. Foster wrote:
Two techniques I have seen, although I don't know the full extent on
browser compatibility. One is to turn Smart Navigation on, and let IE
take care of keeping the page location. The other is to use the
Page.RegisterStartupScript to send a snippt of javascript that sets
the focus on a particular control.


Please note that Smart Navigation will only work in Internet Explorer.

--

Jos Branders
Nov 17 '05 #3
Hi

You could return a script to the client that will scroll the element you
want into view

Example: This should scroll myElement into view
( runs on onload event to make sure element is ready )
<html>
<head>
<script>
function setPos(sElementID){
if(document.getElementById)
{
var e = document.getElementById(sElementID);
if(e!=null) e.scrollIntoView(true);
}
}
</script>
</head>
<body onload="setPos('myElement')">
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<div id="myElement">ho ho I scrolled into view ;)</div>
</body>
</html>

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"David" <ce****************@nospam.com> wrote in message
news:01****************************@phx.gbl...
Hello

I have a datalist on a webpage which initially displays
all the entries in the item view mode. When I select an
item to edit it reloads the page and displays the selected
item in the edit view. The problem I have with this is
that it reloads the browser window displaying the top of
the form. This is fine for an entry at the top of the
grid but if it is towards the bottom the user has to
scroll down the list to the appropiate item. Is their way
to reload the page without it going back to the top of the
page. Or is it best to reorder my grid displaying the
selected item as the first in the list. If so how do I do
this?

Thanks

David

Nov 17 '05 #4

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

Similar topics

4
by: salty_dogs | last post by:
thanks to all who helped steer me away from 'slicing' photoshop images to positioning with css. new question: i have a web page that has a navbar, simple text links. each of these links will...
4
by: blackhawk | last post by:
I need to build a web page that has to potentially display a large amount of data in two grids on the same page. The HTML file with all of the formatting is about 7MB in size. This is too large...
6
by: snazzy | last post by:
I have a problem where using innerHTML to rewrite a DIV or removeChild to kill a DIV that either of them, if excuted before the page is done loading will stop the page in its tracks. ...
12
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
6
by: theGreatGnu | last post by:
Hi all, I am new to PHP, Apache and Mysql. But I least I have managed to install everything on my home computer on my own and everything is up and running. I can fetch data from the database and...
1
by: | last post by:
I have made a web application that is giving me an error in loading assemblies. It reports file not found (error message below). I know I have the .dll in the .bin directory for the application.: ...
6
by: Daz | last post by:
Hi, I am trying to find an event listener which will trigger when the pages starts loading, as opposed to when it's finished, or when the DOM content has finished loading. I am sure that such a...
6
by: ernesto.tejeda | last post by:
Hello, I have a couple of questions regarding the loading of .js files for the browser and would like anyone to point me wher to find the answer (or if you know the answer and tell me will do just...
4
by: Nicolas R | last post by:
Hi all, Im trying to figure out how to display a 'loading' message when scripts are being executed, ie when the page is still not ready for interaction. This is for a web app which relies on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.