unplugged_web Posted April 8, 2010 Report Share Posted April 8, 2010 I wonder if anybody can help me please. I want to use <MARQUEE>, but want it to alternate the text it scrolls. Some text comes from a database other text is just plain text. But other than just putting the text in myself and then adding spaces is there anyway I can get it to display different sentences randomly.For example I'm currently using: <marquee width="570px" loop="50" direction="left" scrollamount="4" onMouseOut="this.start()" onMouseOver="this.stop()" bgcolor="#000000"><?php echo $row['news'] ?> Get your latest news Breaking news Archive news</marquee> But in an idea world I'll like to randomly display the text.Thanks Link to comment Share on other sites More sharing options...
thescientist Posted April 8, 2010 Report Share Posted April 8, 2010 (edited) you would probably need some sort of Javascript function to randomly pick text, maybe with setInterval, you have pre-determined, and then maybe use it conjunction with AJAX to "refresh" the page so the text changes based on what the javascript function has "picked"? Edited April 8, 2010 by thescientist Link to comment Share on other sites More sharing options...
ShadowMage Posted April 8, 2010 Report Share Posted April 8, 2010 Isn't <marquee> deprecated? Link to comment Share on other sites More sharing options...
thescientist Posted April 8, 2010 Report Share Posted April 8, 2010 if only that mattered...still doesn't stop the kiddies from trying to use them Link to comment Share on other sites More sharing options...
Ingolme Posted April 8, 2010 Report Share Posted April 8, 2010 Isn't <marquee> deprecated?No, it's not deprecated. An element can only have been deprecated if it was a standard to begin with. <marquee> was never even a web standard. Link to comment Share on other sites More sharing options...
unplugged_web Posted April 9, 2010 Author Report Share Posted April 9, 2010 you would probably need some sort of Javascript function to randomly pick text, maybe with setInterval, you have pre-determined, and then maybe use it conjunction with AJAX to "refresh" the page so the text changes based on what the javascript function has "picked"?Thanks, I'll give that a go. Link to comment Share on other sites More sharing options...
ShadowMage Posted April 9, 2010 Report Share Posted April 9, 2010 No, it's not deprecated. An element can only have been deprecated if it was a standard to begin with. <marquee> was never even a web standard.Oh. Link to comment Share on other sites More sharing options...
amj Posted April 11, 2010 Report Share Posted April 11, 2010 There are numerous JavaScript alternatives available on the web to replace <MARQUEE> that will work in most of the browsers that don't support it.If the text is in a db then you might be better coding the main part of the page with ASP or some other language (depending upon what is supported by your Internet Server), 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