Results 1 to 4 of 4

Thread: Can buttons be used to control aspects of <marquee>?

  1. #1
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Can buttons be used to control aspects of <marquee>?

    I mean like have a button to restart, stop, and play.
    Is this possible?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The answer is a yes and no. Marquee doesn't, as far as I know, allow any control. In fact, it's not a very good option, because it's outdated and not supported by all browsers.
    However, you can achieve scrolling text using a number of Javascript methods. Then, yes, you could pause, restart, stop, etc.
    I suggest just taking a look through the scripts in the DD library, and seeing if one of the existing scrolling scripts might work, with some adjustments.

    The one thing you could manage with marquee and javascript would be to simply replace the <marquee> element with <div>, <p>, etc., then back again.
    However, this would be a SIMPLE switch, in which it would just be either animated or not, and when it switches to not, it would jump to the "start", and then when it starts again, it would (i'd think) start at the beginning again. But the stop wouldn't keep it at a certain point.

    Anyway, there are a number of scrollers that should work for you.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Dec 2006
    Posts
    47
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default

    Yep

    <marquee scrollamount=1>scrollamount=1</marquee>
    <marquee scrollamount=2 id="q2">scrollamount=2</marquee>
    <button onclick="document.getElementById('q2').scrollAmount=1">slow</button>

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Hmm... what do you know.

    First result on google:
    http://www.sxlist.com/techref/langua...ts/marquee.htm

    See near the bottom.

    Anyway, marquee is still outdated, and I'd recommend another Javascript solution instead.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •