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 November 13th, 2003, 10:04 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default Text that scrolls with your window

Does anyone know how to, with JavaScript, make one of those little images or links in a corner (usually bottom-right) of the window that stays there when you scroll through the page (kind of like frames)?

Thanks
__________________
-Snib - http://www.snibworks.com
Where will you be in 100 years?
 
Old November 14th, 2003, 03:42 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You need to use the onScroll handler of the body tag. Then using some creative math you can position an object on the page. Usually, you need some master container object for everything you want to have move (div and tables work well).

Take a look here for an example of just what you are looking for...
http://www.geekdork.com/samples/dhtm...ioningTest.htm

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old November 14th, 2003, 09:14 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Works great!

Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
open popup window with text reddyshekar C# 2005 1 July 2nd, 2007 08:34 AM
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
iframe refresh scrolls main page down kdm260 ASP.NET 2.0 Professional 0 May 16th, 2006 02:06 PM
Control text font with Window.Status? rweide HTML Code Clinic 7 April 11th, 2005 02:15 PM
Button to replace close window text Burton HTML Code Clinic 12 November 6th, 2003 12:27 PM





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