homepage Welcome to WebmasterWorld Guest from 54.204.64.152
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

    
Adding horizontal scrolling to CNN RSS feed
Using Magpie -- setup and is working
Clair




msg:3302143
 2:40 pm on Apr 4, 2007 (gmt 0)

I am now entering my 30th hour of trying to get such an animal working. Because I see these things all over the web, when I was asked if I could do that, I said "Sure". Figuring with so much use there's got to be a lot of solution.

But, even when I was exhausted and ready to pay money -- no luck. This morning I installed the Magpie code and it is set up and running just fine.

Someone (much earlier in this sub-forum suggested using the marquee tag to make it scroll. I've tried that with an amended BBC style sheet and now I am so close it hurts. So I've come here.

Where I have the typcal vertical list with 5 or six items in it, I now have a 500px wide 30px high bordered box with the first headline in it, at the left. To me, after so much work, it looks gorgeous. BUT, of course it just sits there.

I want the CNN headlines continuously scrolling one after the other from right to left.

Can anyone help? I would probably have to email you the URLs of the involved pages. So, if some hearty soul wants to help me out, I would be most grateful!

Or, if anyone knows of a commercial product that will create this set up for me--single line, scrolling, configurable bg, fonts, and borders are necessary--and it must be displayable on a web page. I'd love the name of that program. (I've tried RSS Feed Scroller which works in the demos but not for me! Seems to be a bit buggy.

Thanks,
Clair
(I have been through this forum back to 2005, with only that one comment on using a marquee having anything to do with what I'm after.)

 

bill




msg:3354034
 12:31 am on May 31, 2007 (gmt 0)

<bump>

Did you have any luck with this one?

Clair




msg:3354444
 11:23 am on May 31, 2007 (gmt 0)

Hi Bill --
No I didn't -- now I'm spending my money taking a JS class and will be signing up for the intermediate one when the first one is done.

I've also bought a couple of XML books -- I'm determined to do this if it takes me the rest of my life! lol

Clair

Microdot




msg:3354492
 12:06 pm on May 31, 2007 (gmt 0)

Is it something like the ticker at the top of this page?

[news.bbc.co.uk...]

If so I can help you with it no problem

Clair




msg:3354636
 2:56 pm on May 31, 2007 (gmt 0)

Hi Microdot==
(Love your name!)

I went to the BBC page and it was very interesting. The news ticker at the top is close, but not what I want. I got excited because the little Listen Live button above that actually performs the way I want when you first load the page-- the whole item scrolls smoothly in from the right, followed by the next one and so on.

However, the ticker that they do have is quite nice. If it's not a big deal, I would love to know how that one works! I figure the more pieces of information I have, as well as practice, will make my project easier in the long run.

If you just add the subdir /blog to the url that is listed in my profile, you will see what I am using there. That's not where I want the long ticker, for design reasons. (The one there is the Advanced RSS Ticker from the dynamic drive site. And, it was close, with being able to format borders, size, type, etc., but of course, no scrolling.

Anyway, I'm really enjoying the JS class I'm taking, -- determination is the mother of learning! or something like that anyway.

I have a bare page with nothing but the ticker I want on it using the marquee code that Jim (from here) sent me -- it functions correctly, but I can't yet figure out how to get it to use a feed -- hence the JS class and the XML books. Again if you just add /ticker2 to my url, you can see it. All the code is in the page, (I was hoping someone would ask to see it, but no one ever did.) This is the one that I referred to in my first msg. as being so close it hurt.

Anyway, I do like the BBC ticker! Perhaps I'll start collecting them. lol

Thanks again for your interest, Micro --
Clair

Microdot




msg:3354946
 7:15 pm on May 31, 2007 (gmt 0)

Thanks Clair..

Here's the code, copy and paste all this into a new page and just put in the url of the feed you want to display, the way I use it on my own site is inside an iframe (yep I know it's sloppy) but you can run it in a normal page without the iframe.

<html>
<head>
<script type="text/javascript">
var sText = ""
var i=0
var iNews=0
var rss = new ActiveXObject("Microsoft.XMLDOM")
rss.async = false
rss.load("http://www.RSS-Feed-URL-HERE)

function GetNewsSource(){
var itemNodes = rss.selectNodes("/rss/channel/item")
var iMax = itemNodes.length

sText = itemNodes.item(iNews).getElementsByTagName("title").item(0).text
myTicker.href = itemNodes.item(iNews).getElementsByTagName("link").item(0).text
ticker()
iNews+=1
if(iNews==iMax){
iNews=0
}
window.setTimeout("GetNewsSource()", (90*sText.length +4000))
}

function ticker(){
i+=1
myTicker.innerText = sText.substring(0,i) + " _"
if(i<sText.length){
window.setTimeout("ticker()",90)
}
else{
i=0
}
}
</script>

</head>
<body bgcolor="#B10000" text="#FFFFFF" link="#FFFFCC" vlink="#FFFFCC" alink="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="GetNewsSource()">
<a id="myTicker" href="" target="_parent"></a>
</body>
</html>

Don't forget to change your body properties and you can add CSS to this too. Good luck.

Clair




msg:3354989
 7:48 pm on May 31, 2007 (gmt 0)

M.
Wow -- very nice.

I will be mucking about with it tomorrow morning. (I get up at 2 a.m.)
Can't wait.

I do think by the time this is over, I will have a nice collection--
did you write this one? If so I'm impressed--the code is small and clean and neat.

I do have one question-- What's this line?

var rss = new ActiveXObject("Microsoft.XMLDOM")

Thanks much, my friend.

Clair

Microdot




msg:3355053
 8:20 pm on May 31, 2007 (gmt 0)

Happy to help.

ActiveXObject("Microsoft.XMLDOM acts as an XML Parser but there's probably better ways to do it to be honest.

Have fun.

Clair




msg:3355561
 10:13 am on Jun 1, 2007 (gmt 0)

M. --
Well, I've tried the page with every DOCTPE known to man, and once more without any --

Nothing but a lovely blank red window comes up and in the error console these two messages, which I have not yet had enough JS to interpret:

ActiveXObject is not defined (on the var rss line)

rss has no properties (on the var itemNodes line)

The feed I'm using is the same I use on my blog page to the cnn-worldnews rss feed.

Will keep messing about.

Cheers,
(AND I don't expect you to do anything at all -- just giving you a report on my morning's fiddling!)

vincevincevince




msg:3355565
 10:18 am on Jun 1, 2007 (gmt 0)

Clair... sounds like you are using something other than IE, and it seems to me the code will work best (only) in IE...

Clair




msg:3355575
 10:33 am on Jun 1, 2007 (gmt 0)

hi Vince --
I've tried it in IE6, IE7, and FF2 -- exact same red screen -- but I can get the error msgs. from FF's error console.

Just have to get myself further along in my JS class! This is what I call a "spur to action"! lol

Thanks for your post though. My question lay dormant for about 6 weeks -- now it has sprung to life with a vengeance!

Clair

vincevincevince




msg:3355617
 11:35 am on Jun 1, 2007 (gmt 0)

Are you running it from your drive (file:// / c:\/) or from a webserver (http://)?

Clair




msg:3355665
 12:20 pm on Jun 1, 2007 (gmt 0)

web server --(Apache on line)
some of the tickers I've tried I can run from my computer, but if there are any problems, I immediately try them online.

When I got the red screen, I of course tried it online, same thing.

Ah well --

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved