SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Location
    NJ
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help - Wondering how to create a tool

    I am interested in creating a tool for other webmasters to place on their website. Basically, I want it to be like a random quote generator, so that every time their page is viewed a random quote will be shown. I can do this using PHP and MySQL, but it works much better for using just on my own website than for providing to others. Does anyone know of a tutorial that can explain this process by using javascript?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)

    random quote

    Hi vandelay welcome to the forums (posting-wise).
    I don't know of any tutorials, but if you google for - javascript random quote - I'm sure you'll find some example code to study. I don't know if I'd call it a "tool", but the scripts I've seen use an array of quotes and display one at random.

  3. #3
    SitePoint Member
    Join Date
    Jul 2007
    Location
    NJ
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the advice, I'll try it. Yeah, poor choice of words ("tool").

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)

    tool

    I suppose that rather than publish the script, you could provide a link to it and host it on your site. Then users could include it by adding a
    HTML Code:
    <script type='text/javascript' src='http://www.yoursite.com/yourscript.js'>
    </script>
    tag where they want it to display. That way you could provide changing quote sets, and get links to your site, if you don't mind the bandwidth use.

  5. #5
    SitePoint Member
    Join Date
    Jul 2007
    Location
    NJ
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that's exactly what I want to do. The script that I found to be the easiest for this is http://www.web1marketing.com/resourc...ndom-quote.htm
    It's exactly what I was looking for.


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
  •