Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: OnClick

  1. #1
    Junior Member
    Join Date
    Feb 2003
    Location
    Elgin, Scotland
    Posts
    28
    Member #
    617
    I have an image on my web page and I have added an onclick behaviour to it. The onclick event plays a timeline. When I run this page the onclick works fine. The problem is it only works the first time it is clicked. If the user clicks on it again then nothing happens. Why is this?

  2.  

  3. #2
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    Post a link so we can see the code.

  4. #3
    Junior Member
    Join Date
    Feb 2003
    Location
    Elgin, Scotland
    Posts
    28
    Member #
    617
    I've attached the file.

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    First of all, change this:
    Code:
    <a href="javascript:;" onClick="MM_timelinePlay('Timeline2')">
    to this:
    Code:
    <a href="#" onClick="MM_timelinePlay('Timeline2')">
    That's not causing your problem, though. The script itself is the source of the problems. Try changing this line:
    Code:
    if (myID == null) { myID = ++tmLn.ID; firstTime=true;}
    to this:
    Code:
    if (myID == null) { myID = tmLn.ID; firstTime=true;}
    I'm not positive this will work... the script is a mess. I'm guessing dreamweaver stuff?

  6. #5
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    By the way.... with all this animation, why not just use flash?

  7. #6
    Junior Member
    Join Date
    Feb 2003
    Location
    Elgin, Scotland
    Posts
    28
    Member #
    617
    Yeah it's dreamweaver stuff. But I solved the problem. OnClick I need to go to frame 1 before I play the timeline again. Thanks for your help!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:12 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com