businessman332211@hotmail.com Posted September 7, 2006 Share Posted September 7, 2006 <?phpHeader("content-type: application/x-javascript"); // notify the browser to treat as javascript// start actual scriptmysql_connect("localhost", "elostand_west", "apex");mysql_select_db("elostand_general");$select = "SELECT * FROM businesses;";$query = mysql_query($select);while ($row = mysql_fetch_array($query)) {$jscode = $row['name'] . '\n' . $row['url'];?>// This is a function to start the scrolling processfunction scrollinformation() { var content = '<?php echo $jscode; ?>'; document.getElementById('scrollboxtime').innerHTML = content; document.getElementById('scrollboxtime').scrollTo(0,0); } // End scroll<?php}?> I did all of this, for such a long time, redoing things, and fixing up things. In the end I find out scroll, scrollTo, scrollFrom aren't made to let you "scroll" text, it's made for you to have scrollbars for text, does anyone know how I can do what I need, it's starting to bother me.I have a database full of business names, and url's.I need to put the business name, and url below the name. I need them to end up being side by side within a div, about 10-20 pixels apart(to account for the url sizes), then I need for it to scroll across the div, from teh right side of the screen to the left, based on the contents of the database, and keep doing infinitely, until the person goes to another page or something. I can get the first one to appear in the div, but I can't get them all to appear in the div, one after another, and I can't get it to scroll at all, I really need some advice on this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now