15 2113
You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message
news:ui**************@TK2MSFTNGP09.phx.gbl... Cheers~
Hello Peter,
try this:
<script language="javascript">
function doscroll(){
x=document.body.scrollHeight;
x=x+99999
window.scrollTo(0,x);
}
</script>
then in your button's tag add onclick="doscroll()" You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message news:ui**************@TK2MSFTNGP09.phx.gbl...
Cheers~
thx
"Peter Rilling" <pe***@nospam.rilling.net> ¦b¶l¥ó
news:%2****************@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g... You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message news:ui**************@TK2MSFTNGP09.phx.gbl... Cheers~
cheers~
"Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó
news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Peter,
try this:
<script language="javascript"> function doscroll(){ x=document.body.scrollHeight; x=x+99999 window.scrollTo(0,x); } </script>
then in your button's tag add onclick="doscroll()"
You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message news:ui**************@TK2MSFTNGP09.phx.gbl...
Cheers~
i would like to know how can i use this script in Asp:Button?
thanks
"Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó
news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Peter,
try this:
<script language="javascript"> function doscroll(){ x=document.body.scrollHeight; x=x+99999 window.scrollTo(0,x); } </script>
then in your button's tag add onclick="doscroll()"
You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message news:ui**************@TK2MSFTNGP09.phx.gbl...
Cheers~
Hello Alan,
in your code just add
button1.Attributes.Add("onclick", "doscroll()");
That should work. i would like to know how can i use this script in Asp:Button? thanks "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Peter,
try this:
<script language="javascript"> function doscroll(){ x=document.body.scrollHeight; x=x+99999 window.scrollTo(0,x); } </script> then in your button's tag add onclick="doscroll()"
You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message news:ui**************@TK2MSFTNGP09.phx.gbl...
Cheers~
i tried it...
but it seems still not work........
"Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó
news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
in your code just add
button1.Attributes.Add("onclick", "doscroll()");
That should work. i would like to know how can i use this script in Asp:Button? thanks "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Peter,
try this:
<script language="javascript"> function doscroll(){ x=document.body.scrollHeight; x=x+99999 window.scrollTo(0,x); } </script> then in your button's tag add onclick="doscroll()"
You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message news:ui**************@TK2MSFTNGP09.phx.gbl...
> Cheers~ >
Hello Alan,
What error do you get (if any) when trying that method?
Martin. i tried it... but it seems still not work........ "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
in your code just add
button1.Attributes.Add("onclick", "doscroll()");
That should work.
i would like to know how can i use this script in Asp:Button? thanks "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Peter,
try this:
<script language="javascript"> function doscroll(){ x=document.body.scrollHeight; x=x+99999 window.scrollTo(0,x); } </script> then in your button's tag add onclick="doscroll()" > You could try using the window.scrollTo() method in JavaScript. > > "Alan Ho" <gt*********@yahoo.com.hk> wrote in message > news:ui**************@TK2MSFTNGP09.phx.gbl... > >> Cheers~ >>
Dear Martin,
I put the Button2.Attributes.Add("onClick", "doscroll()"); in
webForm2.aspx.cs as below
private void Button2_Click(object sender, System.EventArgs e)
{
Button2.Attributes.Add("onClick", "doscroll()");
}
and in html
<script language="javascript">
function doscroll(){
x=documen.body.scrollHeight;
x=x+999;
self.scrollTo(0,100);}</script>
<h2>
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION:
absolute; TOP: 912px" runat="server" Text="Button"
onClick="doscroll()"></asp:Button></h2>
after i try to run it...show the error message
"CS0117: 'ASP.WebForm2_aspx' not include 'doscroll' define / declare
"Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó
news:20*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
What error do you get (if any) when trying that method?
Martin.
i tried it... but it seems still not work........ "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
in your code just add
button1.Attributes.Add("onclick", "doscroll()");
That should work.
i would like to know how can i use this script in Asp:Button? thanks "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... > Hello Peter, > > try this: > > <script language="javascript"> > function doscroll(){ > x=document.body.scrollHeight; > x=x+99999 > window.scrollTo(0,x); > } > </script> > then in your button's tag add onclick="doscroll()" >> You could try using the window.scrollTo() method in JavaScript. >> >> "Alan Ho" <gt*********@yahoo.com.hk> wrote in message >> news:ui**************@TK2MSFTNGP09.phx.gbl... >> >>> Cheers~ >>>
Hello Alan,
In your html you need to change
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION:
absolute; TOP: 912px" runat="server" Text="Button"
onClick="doscroll()"></asp:Button>
to
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION:
absolute; TOP: 912px" runat="server" Text="Button"></asp:Button>
Martin. Dear Martin, I put the Button2.Attributes.Add("onClick", "doscroll()"); in webForm2.aspx.cs as below private void Button2_Click(object sender, System.EventArgs e) { Button2.Attributes.Add("onClick", "doscroll()"); }
and in html
<script language="javascript"> function doscroll(){ x=documen.body.scrollHeight; x=x+999; self.scrollTo(0,100);}</script> <h2> <asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button" onClick="doscroll()"></asp:Button></h2> after i try to run it...show the error message "CS0117: 'ASP.WebForm2_aspx' not include 'doscroll' define / declare "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:20*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
What error do you get (if any) when trying that method?
Martin.
i tried it... but it seems still not work........ "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
in your code just add
button1.Attributes.Add("onclick", "doscroll()");
That should work.
> i would like to know how can i use this script in Asp:Button? > thanks > "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó > news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... >> Hello Peter, >> >> try this: >> >> <script language="javascript"> >> function doscroll(){ >> x=document.body.scrollHeight; >> x=x+99999 >> window.scrollTo(0,x); >> } >> </script> >> then in your button's tag add onclick="doscroll()" >>> You could try using the window.scrollTo() method in JavaScript. >>> >>> "Alan Ho" <gt*********@yahoo.com.hk> wrote in message >>> news:ui**************@TK2MSFTNGP09.phx.gbl... >>> >>>> Cheers~ >>>>
Dear Martin,
Thank you your help
I have followed and changed it. And i can run it. however,
when i press the Button2 ....which it nothing happen.....it seem haven't run
the doscroll()....
help please..
Thanks..
^_^
Alan
"Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó
news:21*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
In your html you need to change
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button" onClick="doscroll()"></asp:Button>
to
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button"></asp:Button>
Martin.
Dear Martin, I put the Button2.Attributes.Add("onClick", "doscroll()"); in webForm2.aspx.cs as below private void Button2_Click(object sender, System.EventArgs e) { Button2.Attributes.Add("onClick", "doscroll()"); }
and in html
<script language="javascript"> function doscroll(){ x=documen.body.scrollHeight; x=x+999; self.scrollTo(0,100);}</script> <h2> <asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button" onClick="doscroll()"></asp:Button></h2> after i try to run it...show the error message "CS0117: 'ASP.WebForm2_aspx' not include 'doscroll' define / declare "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:20*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
What error do you get (if any) when trying that method?
Martin.
i tried it... but it seems still not work........ "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... > Hello Alan, > > in your code just add > > button1.Attributes.Add("onclick", "doscroll()"); > > That should work. > >> i would like to know how can i use this script in Asp:Button? >> thanks >> "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó >> news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... >>> Hello Peter, >>> >>> try this: >>> >>> <script language="javascript"> >>> function doscroll(){ >>> x=document.body.scrollHeight; >>> x=x+99999 >>> window.scrollTo(0,x); >>> } >>> </script> >>> then in your button's tag add onclick="doscroll()" >>>> You could try using the window.scrollTo() method in JavaScript. >>>> >>>> "Alan Ho" <gt*********@yahoo.com.hk> wrote in message >>>> news:ui**************@TK2MSFTNGP09.phx.gbl... >>>> >>>>> Cheers~ >>>>>
Hello Alan,
Can you send me the html from the view source? (i.e. in your browser after
it's been processed on the server)
Martin. Dear Martin, Thank you your help I have followed and changed it. And i can run it. however, when i press the Button2 ....which it nothing happen.....it seem haven't run the doscroll().... help please.. Thanks.. ^_^ Alan "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:21*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
In your html you need to change
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button" onClick="doscroll()"></asp:Button>
to
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button"></asp:Button>
Martin.
Dear Martin, I put the Button2.Attributes.Add("onClick", "doscroll()"); in webForm2.aspx.cs as below private void Button2_Click(object sender, System.EventArgs e) { Button2.Attributes.Add("onClick", "doscroll()"); } and in html
<script language="javascript"> function doscroll(){ x=documen.body.scrollHeight; x=x+999; self.scrollTo(0,100);}</script> <h2> <asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button" onClick="doscroll()"></asp:Button></h2> after i try to run it...show the error message "CS0117: 'ASP.WebForm2_aspx' not include 'doscroll' define / declare "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:20*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
What error do you get (if any) when trying that method?
Martin.
> i tried it... > but it seems still not work........ > "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó > news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... >> Hello Alan, >> >> in your code just add >> >> button1.Attributes.Add("onclick", "doscroll()"); >> >> That should work. >> >>> i would like to know how can i use this script in Asp:Button? >>> thanks >>> "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó >>> news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... >>>> Hello Peter, >>>> >>>> try this: >>>> >>>> <script language="javascript"> >>>> function doscroll(){ >>>> x=document.body.scrollHeight; >>>> x=x+99999 >>>> window.scrollTo(0,x); >>>> } >>>> </script> >>>> then in your button's tag add onclick="doscroll()" >>>>> You could try using the window.scrollTo() method in >>>>> JavaScript. >>>>> >>>>> "Alan Ho" <gt*********@yahoo.com.hk> wrote in message >>>>> news:ui**************@TK2MSFTNGP09.phx.gbl... >>>>> >>>>>> Cheers~ >>>>>>
sent it
thanks
"Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó
news:21*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
Can you send me the html from the view source? (i.e. in your browser after it's been processed on the server)
Martin.
Dear Martin, Thank you your help I have followed and changed it. And i can run it. however, when i press the Button2 ....which it nothing happen.....it seem haven't run the doscroll().... help please.. Thanks.. ^_^ Alan "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:21*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Alan,
In your html you need to change
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button" onClick="doscroll()"></asp:Button>
to
<asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button"></asp:Button>
Martin.
Dear Martin, I put the Button2.Attributes.Add("onClick", "doscroll()"); in webForm2.aspx.cs as below private void Button2_Click(object sender, System.EventArgs e) { Button2.Attributes.Add("onClick", "doscroll()"); } and in html
<script language="javascript"> function doscroll(){ x=documen.body.scrollHeight; x=x+999; self.scrollTo(0,100);}</script> <h2> <asp:Button id="Button2" style="Z-INDEX: 101; LEFT: 352px; POSITION: absolute; TOP: 912px" runat="server" Text="Button" onClick="doscroll()"></asp:Button></h2> after i try to run it...show the error message "CS0117: 'ASP.WebForm2_aspx' not include 'doscroll' define / declare "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:20*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... > Hello Alan, > > What error do you get (if any) when trying that method? > > Martin. > >> i tried it... >> but it seems still not work........ >> "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó >> news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... >>> Hello Alan, >>> >>> in your code just add >>> >>> button1.Attributes.Add("onclick", "doscroll()"); >>> >>> That should work. >>> >>>> i would like to know how can i use this script in Asp:Button? >>>> thanks >>>> "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó >>>> news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... >>>>> Hello Peter, >>>>> >>>>> try this: >>>>> >>>>> <script language="javascript"> >>>>> function doscroll(){ >>>>> x=document.body.scrollHeight; >>>>> x=x+99999 >>>>> window.scrollTo(0,x); >>>>> } >>>>> </script> >>>>> then in your button's tag add onclick="doscroll()" >>>>>> You could try using the window.scrollTo() method in >>>>>> JavaScript. >>>>>> >>>>>> "Alan Ho" <gt*********@yahoo.com.hk> wrote in message >>>>>> news:ui**************@TK2MSFTNGP09.phx.gbl... >>>>>> >>>>>>> Cheers~ >>>>>>>
Do you want this button to perform a postback? If not, then you might try
just using a standard HTML button <input type="button" ...> and attaching
the client-side onclick event to the tag.
The implementation for this will be different if the button posts back to
the server.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message
news:u#**************@TK2MSFTNGP15.phx.gbl... i would like to know how can i use this script in Asp:Button? thanks "Martin Carolan" <mc******@gmail.com> ¦b¶l¥ó news:17*********************@news.cable.ntlworld.c om ¤¤¼¶¼g... Hello Peter,
try this:
<script language="javascript"> function doscroll(){ x=document.body.scrollHeight; x=x+99999 window.scrollTo(0,x); } </script>
then in your button's tag add onclick="doscroll()"
You could try using the window.scrollTo() method in JavaScript.
"Alan Ho" <gt*********@yahoo.com.hk> wrote in message news:ui**************@TK2MSFTNGP09.phx.gbl...
> Cheers~ >
If you want to jump to a certain point in a page, you can set a named
anchor on your page, then reference it with an href tag. This is a
straight HTML method.
-------------------------
<a name="top">Top of Page</a><br/>
<a href="#bottom">Go To bottom of Page</a>
<br/><!--Add enough HTML to make the scroll evident-->
<br/>
<a href="#top">Go to Top</a><br/>
<a name="bottom">Bottom of Page</a>
-------------------------
Hope this helps,
jo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nick Li |
last post by:
Hi,
I need to create a html page so that "Back" button(or some other
button) is disabled in IE browser.
I would appreciate your help.
Nick Li
|
by: Tom Youngquist |
last post by:
Does anyone know the command to "imitate" the "Back" button on a browser
in .NET. I have looked in the Redirect but can't seem to find anything. I
can re-direct to a specific page but my users...
|
by: Paul Turley |
last post by:
Does anyone have some sample script to "press" a button or image button when
the user presses the Enter key? I see this behavior on a lot of web pages
but I'm not finding any samples.
Thx
--...
|
by: Henke |
last post by:
Hi,
I have done some research about my problem I have
when using the "back button" in IE to go back to a
page with two dropdown lists.
The both dropdown lists
are populated with data. The...
|
by: Venus |
last post by:
Hello,
I am trying to generate a dynamic form at runtime and would like to do it
using "<asp: ..." form elements as follows
Build up the string that is placed somewhere in the HTML code the...
|
by: Olivier Verdin |
last post by:
Hi,
I am developing a multi-language application in ASP.NET in c#.
I am using a file field html control to upload an image.
I would like to change the text on the button "browse" that comes...
|
by: felecha |
last post by:
I'm something of a rookie at .Net. I know I can set TabIndex for
controls in a GroupBox, and tab my way over to a button so it's
"Active" and will be clicked by hitting the Enter key.
But isn't...
|
by: Agnes |
last post by:
I use vb.net to preview the report (it is designed by cyrstal report),
and there is "X" button on the left hand side of "refresh", when I mouse
on"X" button , it said "close current view"
However,...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
|
by: jack2019x |
last post by:
hello, Is there code or static lib for hook swapchain present?
I wanna hook dxgi swapchain present for dx11 and dx9.
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
| | |