Javascript Text banner: Can anyone help me?

Sunday, November 2, 2003 by joetheblow | Discussion: WinCustomize Talk

I am trying to create a text banner or 'ticker' across a page on my website. I want it to use the RSS feeds form here and other customization/art sites and webblogs but I am at a total loss as to where to start or for that matter where to find info on it.


If you have any info on it I would appreciate it. For the most part I want to understand how it works.

The how do you get it to read the XML (RSS) feeds?

Thank you.

[Message Edited]
First Previous Page 1 of 2 Next Last
themorphium
Reply #1 Monday, November 3, 2003 11:59 AM
It depends on site. If there is an RSS or RDF feed, You should get the info. If there isn't, there's nothing You can do. I suppose so. But in about fifty percent im wrong.

Maybe 90%. Ehh..
craeonics
Reply #2 Monday, November 3, 2003 2:03 PM
I'd say you should get it parsed via some server side scripting language like php. Not an easy task if you know nothing about this though. Better run a se
craeonics
Reply #3 Monday, November 3, 2003 2:04 PM
*cough*

Better run a search on google, I was saying. My fingers are trigger happy today.
paxx
Reply #4 Monday, November 3, 2003 3:33 PM

Joe, you can't feed an XML feed directly, with javascript alone.  You need to parse it first. There are many parsers availble though, eithre in perl as a server side CGI, in client side Java, or as a server side PHP or ASP script.

PHP is probably your best choice, if your host supports it.
I'll be glad to give you a hand with it, if you can find out if your server supports PHP.

Peff
Reply #5 Monday, November 3, 2003 3:38 PM
joe,

First you'll need a decent scroller...there are a few free one's (for non-commercial use) here

http://www.dynamicdrive.com/dynamicindex2/iframe-scroller.htm

Next, you'll need a serverside component (or equivelent script) that retrieves the feed and converts the XML feed data into HTML (to produce the scrolled HTML file).

How you get the conversion done depends somewhat (yes, Linux will do ASP - with chilisoft) on the platform that will host the page. As crae said, PHP is definitely a possiblity. If you're being hosted on a windows machine, then I can throw a converter together for you without much difficulty.

That should be all you need to make this happen.

Hope this helps and let me know how you get on,
Stefan




Powered by SkinBrowser!
Peff
Reply #6 Monday, November 3, 2003 3:39 PM
paxx beat me to it...



Powered by SkinBrowser!
joetheblow
Reply #7 Monday, November 3, 2003 4:33 PM
I am on a ASP/Microsoft server.

I thought, firstly, that an RSS feed is XML. It looks the same to me as far as coding.

Secondly I didn't think of the process of changing the RSS into HTML (so the javascript thingy can read it) so now with that bit of info I can search better term on Google.



Of which brings me to Google. I must be using the wrong search terms because I am not getting what can help me. Finding a javascript roller/ticker is ok, but a tutorial on how to adjust it to work is another.

THANKS paxx, peff, crae, and Morph (never heard of RDF feeds)!!!! I'll throw it this way for your help.

By the way, I don't know if my site is commercial. I do sell stuff to support the site (and maybe pay some of my bills)

Does that make it commercial?
Like ad space and JTB t-shirts?
joetheblow
Reply #8 Monday, November 3, 2003 5:48 PM
So now, once I get the parser, all I have to do is change the areas where the url's are supposed to go into variables so that way when the HTML changes, the variables change and poof!

News ticker.


All this pasrcer business has me rattled.

joetheblow
Reply #9 Tuesday, November 4, 2003 5:34 AM
Ok, I am going to post what I go but it won't be until Wednesday.

I am so excited!!!!!
I know its just a ticker but I think it will be a great way to get information on sites I like to see, new uploads, blog stories, tech news.... and on and on.

http://www.opencube.com/
I hope I don't go ticker crazy.

Goon night all.

tehehe I am so excited!!!!!




[Message Edited]
[Message Edited]
paxx
Reply #10 Tuesday, November 4, 2003 8:41 AM

Joe, you know, it can also be done in Flash.

Here is a RSS news reader in Flash. Quite nice. It's not a scroller though.
Check it out: http://www23.brinkster.com/palelips/rssreader/brr.html

joetheblow
Reply #11 Tuesday, November 4, 2003 9:44 AM
OK I am so excited I didn't go to sleep.

I understand the javascript enough with playing around somewhat... from the instructions and such, all I need to do is change a few variables and the url text (depending on the script)


I figured that all I need to do is to make a variable for the url and let the javascript go get the XML/RSS url.

Anyway I am using a few found scripts for news but one in piticular will be getting feeds from here and a bunch of other sites.

I used News bars script by Premshree Pillai:

http://www.codeproject.com/useritems/tickers.asp



so now the weird part. I found this spot:
http://www.rssreader.com/download.htm

But it sounds like it going on my computer and not on the server.

I think I don't understand because I'm tired. Maybe I'll take a nap or something.

http://www.dynamicdrive.com/dynamicindex2/newsbar.htm

Now this parser thing...

Maybe here is better?
http://home.att.net/~codeLibrary/XML/rss.htm


Peff where are you?
paxx, you sleeping??

paxx
Reply #12 Tuesday, November 4, 2003 9:54 AM
I'm here.
paxx
Reply #13 Tuesday, November 4, 2003 9:56 AM
The problem I found with Javascript marquees, is that the RSS feeds always contains quotes and double quotes, which screws up the marquee script. Thats why I'm looking at Flash right now.  And the cool thing is that Flash is also the parser.
craeonics
Reply #14 Tuesday, November 4, 2003 3:10 PM
And since Flash has a built-in xml parser, it should be easier that way. Relatively speaking ofcourse. You still need to know how to script.

Server-side handling is cleaner though, me thinks.


As for your links, from bottom to top (I read upside down):

1. That ASP script should probably run on your server. It's quite clean too, so give that one a spin.

2. This dHTML thing has little to do with RSS and newsfeeds and more with a means to display them. In order to use this you would first have to grab the RSS-feed somehow and morph it into something this script can use. Better forget about this one.

3. RSSReader is an app to read feeds with, not something you can use on your site.

4. And this is another dHTML thing. Little to do with the actual feed.


Note that I'm not too fond of things moving around on sites, which is why I frown on "tickers" and focus primarily on the RSS aspect of your question.
craeonics
Reply #15 Tuesday, November 4, 2003 3:30 PM
By the way, google does have a directory on it. You just have to dig real deep to find it: http://directory.google.com/Top/Reference/Libraries/Library_and_Information_Science/Technical_Services/Cataloguing/Metadata/RDF/Applications/RSS/
joetheblow
Reply #16 Tuesday, November 4, 2003 11:35 PM
Thanks guys.

Crae, your such a downer. I was so hyped about having the ticker.

Well I am still a little giggly about the whole thing.


So I still need a parcer huh? Great. I don't know flash at all so that is out for now at least (plus I don't have the program)



I still want to show links to blogs. I guess I am going to have to find another way.




How do I get the links to other blogs, wincustomize and other sites come up on the page as a list of links???????

I have to rethink this thing over.
I'm sad now.

craeonics
Reply #17 Wednesday, November 5, 2003 5:24 PM
Like I said, give that ASP script you linked to a spin. It should do what you want.
joetheblow
Reply #18 Wednesday, November 5, 2003 11:12 PM
ok...


Still want the tickers... I don't know, the thrill seems to be gone for some reason.

Maybe when I work on this tomorrow it will change.
paxx
Reply #19 Wednesday, November 5, 2003 11:14 PM
I tried out the ASP script, and it's not working on my system. I don't know enough ASP to figure out what's wrong, but it's giving me some error message about style or whatever. Anyway, you can try it out.
But I did find a good PHP script that works perfectly though, if you can get access to a PHP server.
paxx
Reply #20 Wednesday, November 5, 2003 11:16 PM
And again, the problem with the ticker is that it won't work because there quotes and double quotes in the returned data will interfere with the javascript code. Maybe you can find a Java ticker instead? Ot just use the marquee tag, but that only works with IE.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01