Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Scrolling text from right to left...

Posted by: Focus1 May 20 2012, 05:59 PM

Hi guy's hope all is well your side of things smile.gif

I hope I'm in the right section here to post this, if not apologies!

Basically in my next website that I have in mind I'd like to add like a 'scroll bar' with text going across the screen from right to left about 30px in height or so. I see in the past this could be done via marquee but now I believe this is frowned upon so I'm looking for an alternative way to implement this such scrolling text, is there a way this can be done in an 'easy' way or does it involve javascrip ? which I havn't a clue about and also I can't find any tutorials on youtube on how to do this either.

All suggestions welcome and appreciated smile.gif

Cheers !

Posted by: Christian J May 20 2012, 07:25 PM

QUOTE(Focus1 @ May 21 2012, 12:59 AM) *

I see in the past this could be done via marquee but now I believe this is frowned upon

Most of the frowning is due to scrolling text being extremely distracting to viewers. In other words it's best avoided, regardless of how it's achieved. As for the actual MARQUEE element it has never been part of the W3C spec.

QUOTE
so I'm looking for an alternative way to implement this such scrolling text, is there a way this can be done in an 'easy' way or does it involve javascrip ?

CSS3 does have an analogy to the MARQUEE element, but I don't know about browser support. Javascript is probably your best bet if you want wide support and valid HTML. If you want an easy solution, stick with the MARQUEE element and disregard W3C.

QUOTE
also I can't find any tutorials on youtube on how to do this either.

Why would you need that? wacko.gif

Posted by: pandy May 20 2012, 08:55 PM

Because he doesn't have a clue about JavaScript, probably. tongue.gif

Luckily you can find ready made scripts, just to plug in and use. For example here.
http://www.dynamicdrive.com/dynamicindex2/

Posted by: Christian J May 21 2012, 08:52 AM

QUOTE(pandy @ May 21 2012, 03:55 AM) *

Because he doesn't have a clue about JavaScript, probably. tongue.gif

No I meant Youtube as opposed to written tutorials. Seems easier with written ones, since there should be code examples to copy.

Posted by: Focus1 May 21 2012, 09:13 AM

Hi guy's and thanks for the replies!

As far as the youtube thing goes, I usually find most of my answers there to most issues as I can see it being done but yes in regards to the javascript code, it does make sense to copy and paste the way I did, so thank you for pointing me in the right direction as I tried numerous other sites but got no-where.

A couple of questions, I found what I was looking for in the javascript, but the w3c is throwing back 27 errors, can I let this go or will I have to rectify it? I tried to rectify some of the errors but then the scrolling text just wasn't happening, so as I'm new at this game I'd like your advice on this please.

Also, after applying the java script, and opening the .html file in IE 9, it's saying something like 'Internet Explorer has restricted this webpage from running scripts or active X content - allow blocked content'.
I'm sure this would put a user off opening up a webpage if they were unsure about it, any way around this or if you apply javascript this is the normal thing to happen ?

Again, as always, thanks for the knowledge and advice smile.gif


Posted by: Christian J May 21 2012, 12:09 PM

QUOTE(Focus1 @ May 21 2012, 04:13 PM) *

w3c is throwing back 27 errors, can I let this go or will I have to rectify it?

Can't say without seeing the page.

QUOTE
Also, after applying the java script, and opening the .html file in IE 9, it's saying something like 'Internet Explorer has restricted this webpage from running scripts or active X content - allow blocked content'.
I'm sure this would put a user off opening up a webpage if they were unsure about it, any way around this or if you apply javascript this is the normal thing to happen ?

Sounds like the security restriction in MSIE when you open an HTML file with javascript from your local machine. It shouldn't happen on the web. See also http://www.phdcc.com/xpsp2.htm

Posted by: pandy May 21 2012, 12:16 PM

Ah sorry. I don't understand why people want video either.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)