Results 1 to 3 of 3

Thread: Make script work on click

  1. #1
    Join Date
    Aug 2006
    Location
    La Paz, Bolivia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Make script work on click

    1) Script Title: ProHTML ticker

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...htmlticker.htm

    3) Describe problem: Hi, I was wondering if there's a way to make the script work when you click on a link, instead of when teh window loads. Thank you

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

    Default

    Remove:
    Code:
    if (window.addEventListener)
    window.addEventListener("load", startscroller, false)
    else if (window.attachEvent)
    window.attachEvent("onload", startscroller)
    Then use for your link:
    Code:
    <a href="#" onclick="startscroller(); return false;">Text</a>
    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!

  3. #3
    Join Date
    Aug 2006
    Location
    La Paz, Bolivia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you!

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
  •