Results 1 to 6 of 6

Thread: Looking For Help

  1. #1
    Join Date
    Jul 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Looking For Help

    I am trying to add a marquee - type scroller to my site. However, I would like the text to scroll in a circular fashon like:
    abc...abc...abc

    not abc across the window then start over.

    hints, suggestions and complete solutions are welcome!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Continuous Horizontal Marquee

    Click above link, then right click on the page and choose view source.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks works great!
    When trying to understand the source, I do not comprehend some of the statement such as:
    document.getElementById? document.getElementById("iemarquee2") : document.all.iemarquee2
    Could you direct me to a resource so that I can learn these constructs

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    one ? two : three is equivalent to
    Code:
    if (one) {
    two;
    } else {
    three;
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jul 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Exam answer so the code snippet says
    If the browser supports DOM then find the node for the Marquee otherwise use the collections method to find marquee2.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes indeed. It also returns a value, so you can use it in statements like this:
    Code:
    var one = two ? three : four;
    where a variable called one is created, then if two is true, assign it the value of three; otherwise, assign it the value of four.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •