473,624 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Making the page scroll down

Is there an easy way to have the page scroll to the next button?
When I populate a drop down list box, I have to use the arrow key or the
mouse to scroll down. I would like for the page to be positioned at or
near the bottom. I have turned smart navigation on. That helps, but
still isn't enough.

Thanks
Nov 17 '05 #1
5 2624
Hi,

You may use Marks <a>, then set location to #YourMark ,
This piece of code does a similar thing, it's only a fragment but will give
you the idea, In my case it's dynamic, if you need it static you can declare
the <a> where needed.

In the code behind:
if ( SomeStuffHere )
{
//Now set an A element
LiteralControl tag = new LiteralControl( "<a id='cometome'
name='cometome' >");
int pos = recordgrid.Sele ctedIndex;
pos = pos>1?pos-1:pos;
recordgrid.Item s[ pos].Cells[2].Controls.Add( tag);
gotomark = new LiteralControl( "<script> var
gotomark='comet ome';</script>" );
}
else
gotomark = new LiteralControl( "<script> var gotomark='';</script>" );
this.Controls.A dd( gotomark);

In the page :
<body MS_POSITIONING= "GridLayout " bottommargin=0 topmargin=0
onload="GotoMar k();">

function GotoMark()
{
if ( gotomark !='')
location = "#"+ gotomark;

}
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


"MacKenzieMouse " <no************ @yahoo.com> wrote in message
news:1f******** ************@co mcast.com...
Is there an easy way to have the page scroll to the next button?
When I populate a drop down list box, I have to use the arrow key or the
mouse to scroll down. I would like for the page to be positioned at or
near the bottom. I have turned smart navigation on. That helps, but
still isn't enough.

Thanks

Nov 17 '05 #2
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

You may use Marks <a>, then set location to #YourMark ,
This piece of code does a similar thing, it's only a fragment but will give
you the idea, In my case it's dynamic, if you need it static you can declare
the <a> where needed.

In the code behind:
if ( SomeStuffHere )
{
//Now set an A element
LiteralControl tag = new LiteralControl( "<a id='cometome'
name='cometome' >");
int pos = recordgrid.Sele ctedIndex;
pos = pos>1?pos-1:pos;
recordgrid.Item s[ pos].Cells[2].Controls.Add( tag);
gotomark = new LiteralControl( "<script> var
gotomark='comet ome';</script>" );
}
else
gotomark = new LiteralControl( "<script> var gotomark='';</script>" );
this.Controls.A dd( gotomark);

In the page :
<body MS_POSITIONING= "GridLayout " bottommargin=0 topmargin=0
onload="GotoMar k();">

function GotoMark()
{
if ( gotomark !='')
location = "#"+ gotomark;

}
Cheers,

Nov 17 '05 #3
Ignacio,
Thanks for the help.

The page can start at the top, but as the form grows, I would want it to
position to the end. This would have to happen about 5 times. Would
this code do this?

Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

You may use Marks <a>, then set location to #YourMark ,
This piece of code does a similar thing, it's only a fragment but will give
you the idea, In my case it's dynamic, if you need it static you can declare
the <a> where needed.

In the code behind:
if ( SomeStuffHere )
{
//Now set an A element
LiteralControl tag = new LiteralControl( "<a id='cometome'
name='cometome' >");
int pos = recordgrid.Sele ctedIndex;
pos = pos>1?pos-1:pos;
recordgrid.Item s[ pos].Cells[2].Controls.Add( tag);
gotomark = new LiteralControl( "<script> var
gotomark='comet ome';</script>" );
}
else
gotomark = new LiteralControl( "<script> var gotomark='';</script>" );
this.Controls.A dd( gotomark);

In the page :
<body MS_POSITIONING= "GridLayout " bottommargin=0 topmargin=0
onload="GotoMar k();">

function GotoMark()
{
if ( gotomark !='')
location = "#"+ gotomark;

}
Cheers,

Nov 17 '05 #4
Hi,

You could make it do so, the idea is that you set the location to what you
want to make visible, you can add <a> tags in code as the form grows, then
you can keep the last mark with a variable in the same way I do. so yes, you
can do a similar thing
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"MacKenzieMouse " <no************ @yahoo.com> wrote in message
news:43******** ******@yahoo.co m...
Ignacio,
Thanks for the help.

The page can start at the top, but as the form grows, I would want it to
position to the end. This would have to happen about 5 times. Would this
code do this?

Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

You may use Marks <a>, then set location to #YourMark ,
This piece of code does a similar thing, it's only a fragment but will
give you the idea, In my case it's dynamic, if you need it static you can
declare the <a> where needed.

In the code behind:
if ( SomeStuffHere )
{
//Now set an A element
LiteralControl tag = new LiteralControl( "<a id='cometome'
name='cometome' >");
int pos = recordgrid.Sele ctedIndex;
pos = pos>1?pos-1:pos;
recordgrid.Item s[ pos].Cells[2].Controls.Add( tag);
gotomark = new LiteralControl( "<script> var
gotomark='comet ome';</script>" );
}
else
gotomark = new LiteralControl( "<script> var
gotomark='';</script>" );
this.Controls.A dd( gotomark);

In the page :
<body MS_POSITIONING= "GridLayout " bottommargin=0 topmargin=0
onload="GotoMar k();">

function GotoMark()
{
if ( gotomark !='')
location = "#"+ gotomark;

}
Cheers,

Nov 17 '05 #5
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

You could make it do so, the idea is that you set the location to what you
want to make visible, you can add <a> tags in code as the form grows, then
you can keep the last mark with a variable in the same way I do. so yes, you
can do a similar thing
cheers,

Thanks,
I will try this.
Nov 17 '05 #6

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

Similar topics

7
7972
by: Noozer | last post by:
I am able to place values on forms that load into my webbrowser control, but I'd like to be able to scan the page for data. I know to use the HTMLDocument object. Basically I'm hoping to find an example of a DocumentComplete routine that will: - display a list of all elements (tags?) on the page - number of forms on the page - ID, name, type and value for each field on the form
36
72046
by: spence | last post by:
Hi All How do I make it so that when a user clicks in a search text field, the default entry (in this case "Search") is removed automatically - they are then faced with a blank search box and can type straight away Thanks in advance
4
1359
by: Marlene A. Roman | last post by:
Is there a way that when I show some fields below that don't fit in the screen, it automatically makes a scroll down event so the user doesn't have to scroll down the page by his own? Thanks in advance
0
878
by: Paul Fi | last post by:
when i scroll up and down a page i want the panel inside to move as well so that it doesnt disppear when scrolling the page: now i have this javascript code, that does that, but it's not so smooth: prevScroll = 0; function scroll(){ var displayFrame = document.all("ifrmDisplay");
69
13414
by: RC | last post by:
I know how to do this in JavaScript by window.open("newFile.html", "newTarget", "scrollbars=no,resizable=0,width=200,height=200"); The browser will open a new window size 200x200, not allow resize and no auto horizontal, vertical scrolling bars. I am wonder can I do the similar inside a HTML file like
1
5663
by: davidr | last post by:
Hi, I am using Divs with CSS to setup a layout for a site. I am using the <Div>s and style sheets below. I want the TopMenu to go across the entire top of the browser. It does go across the entire top, but let say my screen resolution is 800x600 and the "Content" Div forces scroll bars for the user to scroll to the right to see an object then the TopMenu doesn't go all the way across. The top menu will only go to the screen...
2
2589
by: Rolf Rosenquist | last post by:
I have an asp page, where under special circumstances, I want the page to scroll down a bit. I know how to set up the conditions, but how do I get the page to scroll down to an anchor further down when the it loads? / Rolf
1
10146
by: usgog | last post by:
I have a div close to the bottom of the HTML page, and it is not displayed by default. I also have a link to toggle this div at the top of the page. So after I click the link, the div will show up. But because the position of div in low on the page, users have to scroll down the page to see the div. Otherwise, it is not visible directly. So I am wondering how can I set focus to div directly so after clicking the link, the page will...
2
10929
by: sdevgray | last post by:
Is it possible to make the scroll bar larger on a Combo Box ? The reason I want to do this is so it can be used on a touch screen. I have a list of names linked to the Combo Box, I want a large scroll bar that can be used by a finger ! If not can anybody suggest an alternative ? Many thanks Stuart
0
8174
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8624
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6111
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.