Results 1 to 10 of 10

Thread: Ticker Tape database feed

  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ticker Tape database feed

    I'm looking for a way to dynamically feed a JS ticker tape application from an SQL database. Any help or direction is really appreciated. Thanks

  2. #2
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    you cant have a client side script directly access server side resources.
    if you could, then anyone could get into your databases, find your login table and steal your passwords.

    you could have php read the database then send it so that JS could read the data
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  3. #3
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Does the ticker utilize an RSS feed, or does it just use the text that you input into it. If the latter option, you could use server-side scripting to update it everytime someone calls that page.

    Hope this helps.

    EDIT: Sorry boxxertrumps, posted the same time.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  4. #4
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks. It would not be RSS feed. I can do the SQL query and produce on one line the info I want, but how do I feed that in to a ticker?

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    The ticker is written in Javascript, right? Well PHP can output plain text (or Javascript, HTML, etc). Just make up a php script that calls the SQL query, then output that info in the JS. Pretty simple.

    Let me know if you need any more help.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Jun 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by thetestingsite View Post
    The ticker is written in Javascript, right? Well PHP can output plain text (or Javascript, HTML, etc). Just make up a php script that calls the SQL query, then output that info in the JS. Pretty simple.

    Let me know if you need any more help.
    Hi !
    I found your post whilst browsing thu the net looking for exactly this info:
    I have a ticker - actually a' picture scroller' which uses JS to scroll from down to Up, & I need to have the pix (& comments...) which are part of a DB flow into this ticker / scroller...
    I'm anewbie at JS, but I'm sure it's an easy thing to have JS store the result of a query for use...
    I just dunno how ...
    Thx a million for your help
    for a look at the ticker / picture scroller, my test site URL:
    http://bule.jmbdev.com

  7. #7
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    as he told chamark, use PHP to get the info from the DB...
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  8. #8
    Join Date
    Jun 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Result of a query in JS - News Ticker / Picture Scroller

    Thanks & sorry , that answer was not much help to me: I do know how to make an SQL query in PHP, & I understand the way the ticker on my site is meant to work, but I would just like to be able to dynamically feed the JS ticker with data ( -in this case pix & related comments / links) to the JS script..
    The picture scroller I am using is visible at http://bule.jmbdev.com (the scroller on the right hand side of the pages...
    Many thanks for your patience & possible step by step / 'JS for Dummies' explanations / scripts...
    Best regards,
    Jean Marc

  9. #9
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Get the info via PHP and echo it straight into the javascript itself...
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  10. #10
    Join Date
    Jun 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default


    Sorry again ...
    'Echo it straight into JS itself' ?
    How should I do that ? i guess that's the gheart of th ematter ...
    Many thx
    JM

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
  •