Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,743

    Lightbulb Random Ticket Number Generator

    Sometime back someone asked for a Random Ticket Number Generator.

    Here is the simplest I can offer: Random Ticket Number Generator.web

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,743

    Default Re: Random Ticket Number Generator

    Quote Originally Posted by Acorn View Post
    Sometime back someone asked for a Random Ticket Number Generator.
    Here is the simplest I can offer: Random Ticket Number Generator.web
    Acorn
    replace the Placeholder jQuery script with this to get a lottery ticket approach:
    <script>
    //alert($('.ticket').length);

    $('.ticket').each(function(index) {
    $(this).text("Red " + (index + 312));
    });

    </script>
    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: Random Ticket Number Generator

    I'd just like to say that while Acorn's technique is fine (I haven't tried it), in any situation where security is important, or money involved, etc., this technique should never be used - simply because generating things in a browser using javascript is very easy to hack.

    For a bit of fun, javascript every time, for security, do it on the server.

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,743

    Default Re: Random Ticket Number Generator

    Quote Originally Posted by pauland View Post
    I'd just like to say that while Acorn's technique is fine (I haven't tried it), in any situation where security is important, or money involved, etc., this technique should never be used - simply because generating things in a browser using javascript is very easy to hack.
    For a bit of fun, javascript every time, for security, do it on the server.
    Sensible advice, which is why I placed the design in Graphics Chat. It is meant to be used as a local solution where you would print directly from the browser.

    I've just duplicated a clutch of pages and set them all as a Vertical Supersite and the numbers count cleanly for the Lottery Ticket sequence and the Random values are separately generated.

    In summary, do treat as a bit of fun.
    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

 

 

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
  •