PDA

View Full Version : Ticker Tape database feed



Chamark
12-30-2006, 05:19 PM
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:confused:

boxxertrumps
12-30-2006, 05:32 PM
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

thetestingsite
12-30-2006, 05:33 PM
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.

Chamark
12-30-2006, 06:13 PM
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?

thetestingsite
12-30-2006, 06:18 PM
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.

JMB
06-26-2007, 11:12 AM
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 ...:mad:
Thx a million for your help
for a look at the ticker / picture scroller, my test site URL:
http://bule.jmbdev.com

alexjewell
06-26-2007, 01:27 PM
as he told chamark, use PHP to get the info from the DB...

JMB
06-27-2007, 10:12 AM
Thanks & sorry :confused: , 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

alexjewell
06-27-2007, 02:45 PM
Get the info via PHP and echo it straight into the javascript itself...

JMB
06-27-2007, 04:46 PM
:confused:
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