Text automatically scrolling in ASP.Net

  • Thread starter Thread starter Paul S
  • Start date Start date
P

Paul S

Hi
I have a screen display news data stored in a database. Sometimes the amount
of data displayed exceeds the screen size. How can I make this scroll
automatically over and over again ?
thank Paul S
 
Hi
I have a screen display news data stored in a database. Sometimes the amount
of data displayed exceeds the screen size. How can I make this scroll
automatically over and over again ?
thank Paul S

Hi

to scroll page or document element you can use

window.scrollTo
or
window.scrollBy

dom methods...

when your page's content change check the height of the document
element
if it exceeds the screen size make scroll your content..

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
Thanks, but how do I make it scroll automatically - over and over again
thanks Paul S
 
Hello Paul,

You need to know how much text do you have, for example number of lines
and then you can use window.scrollByLines() or window.scrollByPages()

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


PS> Thanks, but how do I make it scroll automatically - over and over
PS> again thanks Paul S
PS>
PS> "Munna" wrote:
PS>
 
Hi Michael
The information has a ValidFrom property and a ValidTo property indicating
when it should be displayed so I have to calculate it when I generate the
page. I thought of building a table dynamically.
thanks
Paul S

Michael Nemtsev said:
Hello Paul,

You need to know how much text do you have, for example number of lines
and then you can use window.scrollByLines() or window.scrollByPages()

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


PS> Thanks, but how do I make it scroll automatically - over and over
PS> again thanks Paul S
PS>
PS> "Munna" wrote:
PS>
 
Hello Paul,

why to do in on server side?! rely on client, and do it via DOM model, because
you can't be sure about the opened size of browser window.

javascript will do this job smoothly

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


PS> Hi Michael
PS> The information has a ValidFrom property and a ValidTo property
PS> indicating
PS> when it should be displayed so I have to calculate it when I
PS> generate the
PS> page. I thought of building a table dynamically.
PS> thanks
PS> Paul S
PS> "Michael Nemtsev [MVP]" wrote:
PS>
Hello Paul,

You need to know how much text do you have, for example number of
lines and then you can use window.scrollByLines() or
window.scrollByPages()

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

PS> Thanks, but how do I make it scroll automatically - over and over
PS> again thanks Paul S
PS>
PS> "Munna" wrote:
PS>
Hi
I have a screen display news data stored in a database. Sometimes
the amount
of data displayed exceeds the screen size. How can I make this
scroll
automatically over and over again ?
thank Paul S
Hi

to scroll page or document element you can use

window.scrollTo
or
window.scrollBy
dom methods...
when your page's content change check the height of the document
element
if it exceeds the screen size make scroll your content..
Best of luck
Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
Try using one of the JavaScript scrollers out there. You will have to load
the text from your code behind, but that should be all you have to do to get
it working, at least in a basic implementation. If you want reuse, you will
make a server control that spits out the JavaScript.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top