Place your text ad here.
World class Undelete and renowned raid recovery services
WestNIC provides reliable web hosting services
SGD Networks offers Web Hosting, Web Hosting Hyderabad
This answer is part of the Code Style premium content package. You must have a premium content subscription to log in and view the full answer to this question. Use the premium content subscription form below.
A: The script below has a number of global variables to set the basic configuration for the div element below with an id attribute marquee. This provides an identifier for the DOM getElementById() method to obtain a reference to the marquee container element. The scrollMarquee() function then uses the element node's firstChild property to get a reference to the text content of the div and its nodeValue sub-property, which is the text itself. The function then nibbles the first character off the start of the marquee text and shifts it to the end to loop through the text.
Successive calls to the scrollMarquee() function would normally be started by an onload event handler on the body element, but you can also click the marquee to start it. The scrollMarquee() function is then called recursively via the setTimeout() method. Separate stopMarquee() and switchMarquee() functions use the global TIMEOUT_ID variable to check and control the movement of the marquee.
More details available to subscribers:
How can I create a scrolling text marquee with DOM scripting?
You must make a subscription payment to access areas flagged premium content. Use the form below to create an account via PayPal.
The PayPal service allows you to pay securely and independently in your own currency. Payments are billed to Metacentric Internet Limited. We never handle your credit card details.
The Code Style site has accumulated 8 years' worth of answers to the most common Web development questions. Answers are written in clear English with examples and links to other Web resources. Your subscription provides full answers to all premium content questions listed below (and other FAQ sections), plus:
iframe browser and filter the URLs?