unplugged_web Posted April 8, 2010 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 Share Posted April 8, 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"? Link to comment Share on other sites More sharing options...
ShadowMage Posted April 8, 2010 Share Posted April 8, 2010 Isn't <marquee> deprecated? Link to comment Share on other sites More sharing options...
thescientist Posted April 8, 2010 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 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 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 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 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
Archived
This topic is now archived and is closed to further replies.