Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > does anyone knows how to move the bottom of current page, after i press the "button"

Reply
Thread Tools

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

 
 
Alan Ho
Guest
Posts: n/a
 
      04-10-2005
Cheers~


 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      04-10-2005
You could try using the window.scrollTo() method in JavaScript.

"Alan Ho" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Cheers~
>
>



 
Reply With Quote
 
 
 
 
Martin Carolan
Guest
Posts: n/a
 
      04-10-2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> Cheers~
>>




 
Reply With Quote
 
Alan Ho
Guest
Posts: n/a
 
      04-10-2005
cheers~
"Martin Carolan" <(E-Mail Removed)> 秎ン
news:(E-Mail Removed) om い级糶...
> 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >
> >> Cheers~
> >>

>
>
>



 
Reply With Quote
 
Alan Ho
Guest
Posts: n/a
 
      04-10-2005
thx
"Peter Rilling" <(E-Mail Removed)> 秎ン
news:%(E-Mail Removed) い级糶...
> You could try using the window.scrollTo() method in JavaScript.
>
> "Alan Ho" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Cheers~
> >
> >

>
>



 
Reply With Quote
 
Alan Ho
Guest
Posts: n/a
 
      04-10-2005
i would like to know how can i use this script in Asp:Button?
thanks
"Martin Carolan" <(E-Mail Removed)> 秎ン
news:(E-Mail Removed) om い级糶...
> 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >
> >> Cheers~
> >>

>
>
>



 
Reply With Quote
 
Martin Carolan
Guest
Posts: n/a
 
      04-10-2005
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" <(E-Mail Removed)> 秎ン
> news:(E-Mail Removed) om い级糶...
>> 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" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>
>>>> Cheers~
>>>>




 
Reply With Quote
 
Alan Ho
Guest
Posts: n/a
 
      04-10-2005
i tried it...
but it seems still not work........
"Martin Carolan" <(E-Mail Removed)> 秎ン
news:(E-Mail Removed) om い级糶...
> 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" <(E-Mail Removed)> 秎ン
> > news:(E-Mail Removed) om い级糶...
> >> 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" <(E-Mail Removed)> wrote in message
> >>> news:(E-Mail Removed)...
> >>>
> >>>> Cheers~
> >>>>

>
>
>



 
Reply With Quote
 
Martin Carolan
Guest
Posts: n/a
 
      04-10-2005
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" <(E-Mail Removed)> 秎ン
> news:(E-Mail Removed) om い级糶...
>> 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" <(E-Mail Removed)> 秎ン
>>> news:(E-Mail Removed) om い级糶...
>>>> 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" <(E-Mail Removed)> wrote in message
>>>>> news:(E-Mail Removed)...
>>>>>
>>>>>> Cheers~
>>>>>>




 
Reply With Quote
 
Alan Ho
Guest
Posts: n/a
 
      04-10-2005
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" <(E-Mail Removed)> 秎ン
news:(E-Mail Removed) om い级糶...
> 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" <(E-Mail Removed)> 秎ン
> > news:(E-Mail Removed) om い级糶...
> >> 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" <(E-Mail Removed)> 秎ン
> >>> news:(E-Mail Removed) om い级糶...
> >>>> 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" <(E-Mail Removed)> wrote in message
> >>>>> news:(E-Mail Removed)...
> >>>>>
> >>>>>> Cheers~
> >>>>>>

>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
move back to bottom of page after postback Keith G Hicks ASP .Net 1 04-15-2008 01:48 PM
css "div" bottom of window or bottom of content. Dan HTML 1 04-04-2008 09:40 AM
How do we know the memory arrangement using in microprocessors? Top-Bottom or Bottom-Top? Cuthbert C Programming 8 09-13-2006 12:09 PM
CSS to put text at bottom of browser window, or page bottom, whichever is lower? Noozer HTML 1 03-13-2006 10:35 AM
Re: Does anyone knows Ctec Academy? ktavera MCSD 3 05-05-2004 08:45 PM



Advertisments