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 5 2610
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.SelectedIndex;
pos = pos>1?pos-1:pos;
recordgrid.Items[ pos].Cells[2].Controls.Add( tag);
gotomark = new LiteralControl( "<script> var
gotomark='cometome';</script>" );
}
else
gotomark = new LiteralControl( "<script> var gotomark='';</script>" );
this.Controls.Add( gotomark);
In the page :
<body MS_POSITIONING="GridLayout" bottommargin=0 topmargin=0
onload="GotoMark();">
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********************@comcast.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
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.SelectedIndex; pos = pos>1?pos-1:pos; recordgrid.Items[ pos].Cells[2].Controls.Add( tag); gotomark = new LiteralControl( "<script> var gotomark='cometome';</script>" ); } else gotomark = new LiteralControl( "<script> var gotomark='';</script>" ); this.Controls.Add( gotomark);
In the page : <body MS_POSITIONING="GridLayout" bottommargin=0 topmargin=0 onload="GotoMark();">
function GotoMark() { if ( gotomark !='') location = "#"+ gotomark;
}
Cheers,
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.SelectedIndex; pos = pos>1?pos-1:pos; recordgrid.Items[ pos].Cells[2].Controls.Add( tag); gotomark = new LiteralControl( "<script> var gotomark='cometome';</script>" ); } else gotomark = new LiteralControl( "<script> var gotomark='';</script>" ); this.Controls.Add( gotomark);
In the page : <body MS_POSITIONING="GridLayout" bottommargin=0 topmargin=0 onload="GotoMark();">
function GotoMark() { if ( gotomark !='') location = "#"+ gotomark;
}
Cheers,
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.com... 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.SelectedIndex; pos = pos>1?pos-1:pos; recordgrid.Items[ pos].Cells[2].Controls.Add( tag); gotomark = new LiteralControl( "<script> var gotomark='cometome';</script>" ); } else gotomark = new LiteralControl( "<script> var gotomark='';</script>" ); this.Controls.Add( gotomark);
In the page : <body MS_POSITIONING="GridLayout" bottommargin=0 topmargin=0 onload="GotoMark();">
function GotoMark() { if ( gotomark !='') location = "#"+ gotomark;
}
Cheers,
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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....
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
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
|
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...
|
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...
| |