472,373 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

does anyone knows how to move the bottom of current page, after i press the "button"

Cheers~
Nov 19 '05 #1
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~

Nov 19 '05 #2
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~


Nov 19 '05 #3
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~


Nov 19 '05 #4
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~


Nov 19 '05 #5
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~


Nov 19 '05 #6
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~


Nov 19 '05 #7
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~
>


Nov 19 '05 #8
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~
>>


Nov 19 '05 #9
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~
>>>


Nov 19 '05 #10
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~
>>>>


Nov 19 '05 #11
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~
>>>>>


Nov 19 '05 #12
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~
>>>>>>


Nov 19 '05 #13
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~
>>>>>>>


Nov 19 '05 #14
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~
>



Nov 19 '05 #15
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

Nov 19 '05 #16

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

Similar topics

5
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
1
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...
6
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 --...
0
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...
7
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...
3
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...
3
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...
1
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,...
0
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...
0
Oralloy
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++...
0
BLUEPANDA
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...
0
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...
2
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...
1
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...
1
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...
0
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.
0
DizelArs
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', {...

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.