|
|
 |
 |
 |
 |
Javascript / Client Side Development
|
 |
 |
 |
 |
 |
 |
 |
 |
Javascript News Scroller
I'm looking for a javascipt vertical news scroller that will scroll from the bottom of the page to the top showing many new items. Would really appreciate some help. The scroller I'm using at the moment only shows one news item at a time, can anyone suggest code I could insert to show many news items? Mars
Mars wrote on 17 mei 2007 in comp.lang.javascript: > I'm looking for a javascipt vertical news scroller that will scroll > from the bottom of the page to the top showing many new items. > Would really appreciate some help. The scroller I'm using at the > moment only shows one news item at a time, can anyone suggest code I > could insert to show many news items?
Why use js? <marquee direction='up' scrollamount='2'> blah 1<br> blah 2<br> blah 3<br> blah 4 </marquee> -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Evertjan. wrote :
> Mars wrote on 17 mei 2007 in comp.lang.javascript: >> I'm looking for a javascipt vertical news scroller that will scroll >> from the bottom of the page to the top showing many new items. >> Would really appreciate some help. The scroller I'm using at the >> moment only shows one news item at a time, can anyone suggest code I >> could insert to show many news items? > Why use js? > <marquee > direction='up' > scrollamount='2'> > blah 1<br> > blah 2<br> > blah 3<br> > blah 4 > </marquee>
One possible reason would be because <marquee> is not valid HTML 4.01. Another reason is that <marquee> is not accessible: the user can not control it, can not make it stop, slow down, restart, etc. Other possible alternatives for the OP: http://devedge-temp.mozilla.org/toolbox/examples/2002/xb/xbMarquee/ex... http://devedge-temp.mozilla.org/toolbox/examples/2002/xb/xbMarquee/ex... http://devedge-temp.mozilla.org/toolbox/examples/2002/xb/xbMarquee/ex... http://devedge-temp.mozilla.org/toolbox/examples/2002/xb/xbMarquee/in... and http://developer.mozilla.org/en/docs/DHTML_Demonstrations_Using_DOM/S... One good example (cross-browser, using validated markup code, accessible) of using a right to left DHTML marquee: http://developer.mozilla.org/samples/StockTicker/ Grard -- Using Web Standards in your Web Pages (Updated Apr. 2007) http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_...
Grard Talbot said the following on 5/17/2007 10:22 AM:
> Evertjan. wrote : >> Mars wrote on 17 mei 2007 in comp.lang.javascript: >>> I'm looking for a javascipt vertical news scroller that will scroll >>> from the bottom of the page to the top showing many new items. >>> Would really appreciate some help. The scroller I'm using at the >>> moment only shows one news item at a time, can anyone suggest code I >>> could insert to show many news items? >> Why use js? >> <marquee >> direction='up' >> scrollamount='2'> blah 1<br> >> blah 2<br> >> blah 3<br> >> blah 4 >> </marquee> > One possible reason would be because <marquee> is not valid HTML 4.01.
Neither is 99% of the HTML on the web but that doesn't stop people :) -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ - http://jibbering.com/faq/index.html Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Grard Talbot wrote on 17 mei 2007 in comp.lang.javascript:
> vertjan. wrote : >> Mars wrote on 17 mei 2007 in comp.lang.javascript: >>> I'm looking for a javascipt vertical news scroller that will scroll >>> from the bottom of the page to the top showing many new items. >>> Would really appreciate some help. The scroller I'm using at the >>> moment only shows one news item at a time, can anyone suggest code I >>> could insert to show many news items? >> Why use js? >> <marquee >> direction='up' >> scrollamount='2'> >> blah 1<br> >> blah 2<br> >> blah 3<br> >> blah 4 >> </marquee> > One possible reason would be because <marquee> is not valid HTML 4.01.
See Randy's answer > Another reason is that <marquee> is not accessible: the user can not > control it, can not make it stop, slow down, restart, etc.
cannot? <marquee id='m' style='border:red dotted 4px;width:200px;' direction='up' scrollamount='2'> blah 1<br> blah 2<br> blah 3<br> blah 4 </marquee> <script type='text/javascript'> var m = document.getElementById('m') m.direction = 'down' m.scrollAmount = '20' m.height = '120' </script> <button onclick='m.stop();'> Stop </button> <button onclick='m.start();'> Start </button> -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Evertjan. wrote :
> Grard Talbot wrote on 17 mei 2007 in comp.lang.javascript: >> vertjan. wrote : >>> Mars wrote on 17 mei 2007 in comp.lang.javascript: >>>> I'm looking for a javascipt vertical news scroller that will scroll >>>> from the bottom of the page to the top showing many new items. >>>> Would really appreciate some help. The scroller I'm using at the >>>> moment only shows one news item at a time, can anyone suggest code I >>>> could insert to show many news items? >>> Why use js? >>> <marquee >>> direction='up' >>> scrollamount='2'> >>> blah 1<br> >>> blah 2<br> >>> blah 3<br> >>> blah 4 >>> </marquee> >> One possible reason would be because <marquee> is not valid HTML 4.01. > See Randy's answer >> Another reason is that <marquee> is not accessible: the user can not >> control it, can not make it stop, slow down, restart, etc. > cannot? > <marquee id='m' > style='border:red dotted 4px;width:200px;' > direction='up' > scrollamount='2'> > blah 1<br> > blah 2<br> > blah 3<br> > blah 4 > </marquee> > <script type='text/javascript'> > var m = document.getElementById('m') > m.direction = 'down' > m.scrollAmount = '20' > m.height = '120' > </script> > <button > onclick='m.stop();'> > Stop > </button> > <button onclick='m.start();'> > Start > </button>
Yes, it can be controlled (stop, slow down, restart,etc) by the user with javascript. BTW, you incidentally answered your own question: why use js? For normal basic accessibility and usability reasons. The webpage at http://devedge-temp.mozilla.org/toolbox/examples/2002/xb/xbMarquee/in... may offer more power, customization, configurability to people potentially interested in implementing a news ticker, DHTML-marquee. Grard -- Using Web Standards in your Web Pages (Updated Apr. 2007) http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_...
Randy Webb wrote : > Grard Talbot said the following on 5/17/2007 10:22 AM: >> One possible reason would be because <marquee> is not valid HTML 4.01. > Neither is 99% of the HTML on the web but that doesn't stop people :)
Valid markup code is always better, should always be considered or proposed/submitted as the best recommended solution for all the websites out there. I think the 99% may be exagerated a bit. It's possibly 90% - 95% now (just a hunch). Recently, Chris Wilson said (I can not/no longer find where..., can't recall wehre) that out of 200 major websites on the web which were not using web standards in 2001, about 100 of them are now using web standards in their websites. Things are moving, improving slowly (I hope). Grard -- Using Web Standards in your Web Pages (Updated Apr. 2007) http://developer.mozilla.org/en/docs/Using_Web_Standards_in_your_Web_...
Grard Talbot wrote on 18 mei 2007 in comp.lang.javascript: > Yes, it can be controlled (stop, slow down, restart,etc) by the user > with javascript. BTW, you incidentally answered your own question: why > use js? For normal basic accessibility and usability reasons.
No, you are mixing the Qs up, Grard. A JS scroller was asked for in the OQ, I suggested <marquee> which is not a js scroller, but can be controlled by js, which had been negated by you. You wrote: > Another reason is that <marquee> is not accessible: the user can not > control it, can not make it stop, slow down, restart, etc.
-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Grard Talbot said the following on 5/18/2007 5:35 PM: > Randy Webb wrote : >> Grard Talbot said the following on 5/17/2007 10:22 AM: >>> One possible reason would be because <marquee> is not valid HTML 4.01. >> Neither is 99% of the HTML on the web but that doesn't stop people :) > Valid markup code is always better, should always be considered or > proposed/submitted as the best recommended solution for all the websites > out there.
Absolutely :) > I think the 99% may be exagerated a bit. It's possibly 90% - 95% now > (just a hunch). Recently, Chris Wilson said (I can not/no longer find > where..., can't recall wehre) that out of 200 major websites on the web > which were not using web standards in 2001, about 100 of them are now > using web standards in their websites. Things are moving, improving > slowly (I hope).
If it took 7 years for 50% to create valid markup, it looks promising to get to 90% by 2020 :-) -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ - http://jibbering.com/faq/index.html Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Evertjan. a crit : > Mars wrote on 17 mei 2007 in comp.lang.javascript: >> I'm looking for a javascipt vertical news scroller that will scroll >> from the bottom of the page to the top showing many new items. > <marquee > direction='up' > scrollamount='2'> > blah 1<br> > blah 2<br> > blah 3<br> > blah 4 > </marquee>
Too much ! ! That works in my FF, Safari and Opera ! Thought it was IE slang ! The tag 'marquee' is part of HTML 4 ? -- Stephane Moriaux et son (moins) vieux Mac dj dpass
ASM wrote on 19 mei 2007 in comp.lang.javascript:
> Evertjan. a crit : >> Mars wrote on 17 mei 2007 in comp.lang.javascript: >>> I'm looking for a javascipt vertical news scroller that will scroll >>> from the bottom of the page to the top showing many new items. >> <marquee >> direction='up' >> scrollamount='2'> >> blah 1<br> >> blah 2<br> >> blah 3<br> >> blah 4 >> </marquee> > Too much ! ! That works in my FF, Safari and Opera ! > Thought it was IE slang ! > The tag 'marquee' is part of HTML 4 ?
It was said in this thread it is not. The proof of the pudding is in the eating however. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Evertjan. wrote: > ASM wrote on 19 mei 2007 in comp.lang.javascript: >> Evertjan. a crit : >>> Mars wrote on 17 mei 2007 in comp.lang.javascript: >>>> I'm looking for a javascipt vertical news scroller that will scroll >>>> from the bottom of the page to the top showing many new items. >>> <marquee >>> direction='up' >>> scrollamount='2'> >>> blah 1<br> >>> blah 2<br> >>> blah 3<br> >>> blah 4 >>> </marquee> >> Too much ! ! That works in my FF, Safari and Opera ! >> Thought it was IE slang ! >> The tag 'marquee' is part of HTML 4 ? > It was said in this thread it is not. > The proof of the pudding is in the eating however.
This strikes me as really odd. In Firefox 1.5.0.11 the marquee tag malfunctions if JavaScript is not enabled. Anyone else see this in Firefox? -- -Lost Remove the extra words to reply by e-mail. Don't e-mail me. I am kidding. No I am not.
Evertjan. wrote: > Grard Talbot wrote on 17 mei 2007 in comp.lang.javascript: >> vertjan. wrote : >>> Mars wrote on 17 mei 2007 in comp.lang.javascript: >>>> I'm looking for a javascipt vertical news scroller that will scroll >>>> from the bottom of the page to the top showing many new items. >>>> Would really appreciate some help. The scroller I'm using at the >>>> moment only shows one news item at a time, can anyone suggest code I >>>> could insert to show many news items? >>> Why use js? >>> <marquee >>> direction='up' >>> scrollamount='2'> >>> blah 1<br> >>> blah 2<br> >>> blah 3<br> >>> blah 4 >>> </marquee> >> One possible reason would be because <marquee> is not valid HTML 4.01. > See Randy's answer >> Another reason is that <marquee> is not accessible: the user can not >> control it, can not make it stop, slow down, restart, etc. > cannot? > <marquee id='m' > style='border:red dotted 4px;width:200px;' > direction='up' > scrollamount='2'> > blah 1<br> > blah 2<br> > blah 3<br> > blah 4 > </marquee> > <script type='text/javascript'> > var m = document.getElementById('m') > m.direction = 'down' > m.scrollAmount = '20' > m.height = '120'
In what browser, UA, or viewing device were you able to set height or width? I get unable to set a getter. -- -Lost Remove the extra words to reply by e-mail. Don't e-mail me. I am kidding. No I am not.
-Lost wrote on 20 mei 2007 in comp.lang.javascript: >>> The tag 'marquee' is part of HTML 4 ? >> It was said in this thread it is not. >> The proof of the pudding is in the eating however. > This strikes me as really odd.
What does? The above or the below? > In Firefox 1.5.0.11 the marquee tag > malfunctions if JavaScript is not enabled. > Anyone else see this in Firefox?
-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
-Lost wrote on 20 mei 2007 in comp.lang.javascript:
>> <marquee id='m' >> style='border:red dotted 4px;width:200px;' >> direction='up' >> scrollamount='2'> >> blah 1<br> >> blah 2<br> >> blah 3<br> >> blah 4 >> </marquee> >> <script type='text/javascript'> >> var m = document.getElementById('m') >> m.direction = 'down' >> m.scrollAmount = '20' >> m.height = '120' > In what browser, UA, or viewing device were you able to set height or > width?
IE7 > I get unable to set a getter.
Are you perhaps unable to get a setter? alt.dogs.setters.marketplace -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
|
 |
 |
 |
 |
|