472,789 Members | 1,044 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,789 software developers and data experts.

Auto scroll the page?

Hi All,
i have problem to scroll the page the the specific section of the page after
click a command button.

I have tried using <a name="f"> and use response.redirect("xxxx.aspx?#f").
Although it works but i dont wan to reload the page.

I also used hyperlink to goto the "f" section. It works good without fire an
event (which cause reload page) but, the problem, i wan to click on a command
button and not the hyperlink.

So, how to accomplish it by clicking only the command button and direct me
to the "f" section without fire any event.

Any ideas? guiline?

Thank you in advance.
Best regards,
OCurnos
Nov 19 '05 #1
5 2948
Hi,

As far as my understanding, you are using asp.net command button to scroll
the page. If so, use HTML button instead.

And in page_Init event, add the following code.

(Let us say name of the HTML Button is btnScroll)

Protected void Page_Init(object sender, EventArgs e)

{

btnScroll.Attributes.Add("Href","xyz.aspx?#f");

}

I hope this will help you.

Regards,

Pavan
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
Hi All,
i have problem to scroll the page the the specific section of the page
after
click a command button.

I have tried using <a name="f"> and use response.redirect("xxxx.aspx?#f").
Although it works but i dont wan to reload the page.

I also used hyperlink to goto the "f" section. It works good without fire
an
event (which cause reload page) but, the problem, i wan to click on a
command
button and not the hyperlink.

So, how to accomplish it by clicking only the command button and direct me
to the "f" section without fire any event.

Any ideas? guiline?

Thank you in advance.
Best regards,
OCurnos

Nov 19 '05 #2
Hi Pavan,
the code is not working ?? am i miss something??

thank you

"Pavan" wrote:
Hi,

As far as my understanding, you are using asp.net command button to scroll
the page. If so, use HTML button instead.

And in page_Init event, add the following code.

(Let us say name of the HTML Button is btnScroll)

Protected void Page_Init(object sender, EventArgs e)

{

btnScroll.Attributes.Add("Href","xyz.aspx?#f");

}

I hope this will help you.

Regards,

Pavan
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
Hi All,
i have problem to scroll the page the the specific section of the page
after
click a command button.

I have tried using <a name="f"> and use response.redirect("xxxx.aspx?#f").
Although it works but i dont wan to reload the page.

I also used hyperlink to goto the "f" section. It works good without fire
an
event (which cause reload page) but, the problem, i wan to click on a
command
button and not the hyperlink.

So, how to accomplish it by clicking only the command button and direct me
to the "f" section without fire any event.

Any ideas? guiline?

Thank you in advance.
Best regards,
OCurnos


Nov 19 '05 #3
Daniel,

If you'd like some already working code I have a "ScrollToElement" method in
a Javascript component that I give away free on my website (everything there
is free). If you click on the "Code Library" link at the top of
www.aboutfortunate.com and then click the "Javascript" button in the menu on
the left you can download all source code for the component as a Visual
Studio.Net 2003 project. Even if you don't want to use the whole javascript
component (it has a lot of other useful scripts in it) you could always
strip out the ScrollToElement code. It lets you specify what control on the
page to scroll to, or you can give it a page element name as a string in
case you want to scroll to something that isn't a .Net control.

There is also a help file that explains/gives examples of use of all
controls available on my website.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
Hi Pavan,
the code is not working ?? am i miss something??

thank you

"Pavan" wrote:
Hi,

As far as my understanding, you are using asp.net command button to
scroll
the page. If so, use HTML button instead.

And in page_Init event, add the following code.

(Let us say name of the HTML Button is btnScroll)

Protected void Page_Init(object sender, EventArgs e)

{

btnScroll.Attributes.Add("Href","xyz.aspx?#f");

}

I hope this will help you.

Regards,

Pavan
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
> Hi All,
> i have problem to scroll the page the the specific section of the page
> after
> click a command button.
>
> I have tried using <a name="f"> and use
> response.redirect("xxxx.aspx?#f").
> Although it works but i dont wan to reload the page.
>
> I also used hyperlink to goto the "f" section. It works good without
> fire
> an
> event (which cause reload page) but, the problem, i wan to click on a
> command
> button and not the hyperlink.
>
> So, how to accomplish it by clicking only the command button and direct
> me
> to the "f" section without fire any event.
>
> Any ideas? guiline?
>
> Thank you in advance.
> Best regards,
> OCurnos


Nov 19 '05 #4
Thanks Justin.

"S. Justin Gengo" wrote:
Daniel,

If you'd like some already working code I have a "ScrollToElement" method in
a Javascript component that I give away free on my website (everything there
is free). If you click on the "Code Library" link at the top of
www.aboutfortunate.com and then click the "Javascript" button in the menu on
the left you can download all source code for the component as a Visual
Studio.Net 2003 project. Even if you don't want to use the whole javascript
component (it has a lot of other useful scripts in it) you could always
strip out the ScrollToElement code. It lets you specify what control on the
page to scroll to, or you can give it a page element name as a string in
case you want to scroll to something that isn't a .Net control.

There is also a help file that explains/gives examples of use of all
controls available on my website.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
Hi Pavan,
the code is not working ?? am i miss something??

thank you

"Pavan" wrote:
Hi,

As far as my understanding, you are using asp.net command button to
scroll
the page. If so, use HTML button instead.

And in page_Init event, add the following code.

(Let us say name of the HTML Button is btnScroll)

Protected void Page_Init(object sender, EventArgs e)

{

btnScroll.Attributes.Add("Href","xyz.aspx?#f");

}

I hope this will help you.

Regards,

Pavan
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:4F**********************************@microsof t.com...
> Hi All,
> i have problem to scroll the page the the specific section of the page
> after
> click a command button.
>
> I have tried using <a name="f"> and use
> response.redirect("xxxx.aspx?#f").
> Although it works but i dont wan to reload the page.
>
> I also used hyperlink to goto the "f" section. It works good without
> fire
> an
> event (which cause reload page) but, the problem, i wan to click on a
> command
> button and not the hyperlink.
>
> So, how to accomplish it by clicking only the command button and direct
> me
> to the "f" section without fire any event.
>
> Any ideas? guiline?
>
> Thank you in advance.
> Best regards,
> OCurnos


Nov 19 '05 #5
You're welcome.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
Thanks Justin.

"S. Justin Gengo" wrote:
Daniel,

If you'd like some already working code I have a "ScrollToElement" method
in
a Javascript component that I give away free on my website (everything
there
is free). If you click on the "Code Library" link at the top of
www.aboutfortunate.com and then click the "Javascript" button in the menu
on
the left you can download all source code for the component as a Visual
Studio.Net 2003 project. Even if you don't want to use the whole
javascript
component (it has a lot of other useful scripts in it) you could always
strip out the ScrollToElement code. It lets you specify what control on
the
page to scroll to, or you can give it a page element name as a string in
case you want to scroll to something that isn't a .Net control.

There is also a help file that explains/gives examples of use of all
controls available on my website.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Daniel" <Da****@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
> Hi Pavan,
> the code is not working ?? am i miss something??
>
> thank you
>
> "Pavan" wrote:
>
>> Hi,
>>
>> As far as my understanding, you are using asp.net command button to
>> scroll
>> the page. If so, use HTML button instead.
>>
>> And in page_Init event, add the following code.
>>
>> (Let us say name of the HTML Button is btnScroll)
>>
>> Protected void Page_Init(object sender, EventArgs e)
>>
>> {
>>
>> btnScroll.Attributes.Add("Href","xyz.aspx?#f");
>>
>> }
>>
>> I hope this will help you.
>>
>> Regards,
>>
>> Pavan
>>
>>
>> "Daniel" <Da****@discussions.microsoft.com> wrote in message
>> news:4F**********************************@microsof t.com...
>> > Hi All,
>> > i have problem to scroll the page the the specific section of the
>> > page
>> > after
>> > click a command button.
>> >
>> > I have tried using <a name="f"> and use
>> > response.redirect("xxxx.aspx?#f").
>> > Although it works but i dont wan to reload the page.
>> >
>> > I also used hyperlink to goto the "f" section. It works good without
>> > fire
>> > an
>> > event (which cause reload page) but, the problem, i wan to click on
>> > a
>> > command
>> > button and not the hyperlink.
>> >
>> > So, how to accomplish it by clicking only the command button and
>> > direct
>> > me
>> > to the "f" section without fire any event.
>> >
>> > Any ideas? guiline?
>> >
>> > Thank you in advance.
>> > Best regards,
>> > OCurnos
>>
>>
>>


Nov 19 '05 #6

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

Similar topics

1
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the...
5
by: Duane Lambe | last post by:
Hi - just a quick question, I hope it's simple enough that a visual example isn't required. I have an internal site, everything's the way I want it, but there's an anomoly in both Opera and...
0
by: Alex Moskalyuk | last post by:
I am using System.Windows.Forms.TextBox to publish some real-time data that's coming off the external devices. My data is fed into the TextBox with proper precautions not to exceed the MaxSize...
0
by: 23s | last post by:
Is there any way I can send a vertical value to a form's scroll position? I have a full-screen form that, at launch, contains an empty tab sheet. At run time, the user can dynamically append a...
1
by: Badass Scotsman | last post by:
Hello, I have an application which should never allow the back button to be pushed without refreshing the previous page. For example: Step 1: User fills in form.html and presses submit ...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
1
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....
1
by: Jake Barnes | last post by:
I searched comp.lang.javascript on Google Groups but I didn't find an answer when I searched for "viewport" or "viewport div" or any combination of words using "viewport" so now I think I'm...
1
by: pravinnweb | last post by:
can anyone tell me how to set auto height to outer div that is in green box id "gray-background" it should increase relatively to inner div "smbox" here is the css and html code it should work in...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.