The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

I need some help for my procrastination project by Spisefisken2007-07-10 04:32:43
  Don't reload the page each time, but regenerate by sazzer2007-07-10 04:51:40
    I understand the concept of what you are saying by Spisefisken2007-07-10 04:57:58
      Take a look at this: by sazzer 2007-07-10 05:11:39
here
I've borrowed your original code and images to do this, but the code now there shows the way that I would have done it in javascript.

The "rerollDice" function at the top checks a specific checkbox and if it's checked replaces a specific image with a new one.

The "rerollAllDice" function just loops through all 8 dice calling the other function. This is the one that's called from both the body onload - to do the initial rolls - and from the onclick for your link - to reroll the dice again.

The code I've got there isn't great - and I've not tested it in anything apart from Opera - but it does seem to work and you can happily use it for whatever you want...
[ Reply ]
        This was very helpful by Spisefisken2007-07-10 05:20:01
        Yahtzee! by RetiQlum22007-07-10 05:25:20
        Code this simple is bound to work on by EnzoMatrix2007-07-10 06:34:58
          You'd think that... by sazzer2007-07-10 07:15:22

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)