Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 16th, 2006, 03:16 PM
Registered User
 
Join Date: May 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default text scrolling, background staitonery

hi all,
can someone suggest the best way to have text scroll overtop of a stationery background image without a present scroll bar?
thanks in advance.
john

 
Old May 17th, 2006, 02:32 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi John,

The simplest way I can think of for this effect would be to do it with a HTML marquee tag and a fixed background-image.

<marquee behavior = alternate direction = up style = "background-image:url(myImg.jpg); background-attachment:fixed; background-repeat:no-repeat; background-position: top left" bgcolor = "yellow">Your text here</marquee>

You can set the marquee direction to 'up', 'down', 'left' or 'right', while you can also specify how many times the text should scroll using the 'loop = n' parameter. There are a few new events with marquee that are scriptable too. Have a look at this link for info:

http://www.javascriptkit.com/javatutors/marquee3.shtml

Hope that helps

Joe

p.s. Remember to specify width for horizontal scrolling, or width and height for vertical scrolling, in px or %.
 
Old May 17th, 2006, 10:27 AM
Registered User
 
Join Date: May 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

joe, thanks much for the response, however it's not exactly what I'm looking for. now that I see your answer, I see my question was unclear. check here for reference anyone. http://www.webmakersinc.com/aboutus.html. I'm looking to scroll the text only while everything else remains stationery. I could go <iframe>, but I would rather not make a new scroll bar, and use the browser window scroll instead. possible? thanks again.
john

 
Old May 19th, 2006, 09:04 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi John,

Not sure what you mean. If you have text that goes out of the bounds of the text area, then surely a scrollbar will have to be generated? (Unless you turn this off in CSS). But then you wouldn't be able to scroll it. What about a div with overflow:auto? This will generate the scrollbar, but you will then be able to style the div's scrollbar with whatever you want in CSS (although this is obviously possible with textareas and the like). I don't think theres a way of using the main document scrollbar to scroll content in a layer or Iframe, sorry.

 
Old May 23rd, 2006, 11:37 AM
Registered User
 
Join Date: May 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks again joe, I wasn't sure if it was possible, what I was trying to do. I went with the css scrollbar, even though it only works in IE and not Netscape or Firefox.
john






Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding scrolling text with VS 2005/ASP.NET cJeffreywang ASP.NET 2.0 Professional 6 August 15th, 2007 07:28 AM
running scrolling text from stored procedure in VS cJeffreywang ASP.NET 2.0 Basics 1 August 14th, 2007 03:47 PM
Scrolling on text box echovue Access VBA 2 January 3rd, 2007 03:57 PM
scrolling text box bezaman Classic ASP Basics 6 November 10th, 2005 05:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.