Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: httpwebwitch
Client wants box on web page that has a news item in it, e.g.,
Mac's Market opening on June 20th.
That's all that would show in the box. But there would be a forward indicator that when clicked, would go on to the next item, and so on.
I don't want six tons of JS sitting on the home page, so am trying to figure out how best to make some code that would walk through the items in an XML file.
This would be like a manually operated RSS reader, but darned if I can find any that are manually operated!
Any ideas appreciated. Thanks much.
Imagine an RSS Feedreader in a small box-- one item showing at a time.
The item shows for a short time and then the next one shows up.
I want that, BUT, I don't want it to move automatically. I want there to be a button that goes from the current item to the next, when the user clicks it.
In other words, there's a bit of text in a box, the user clicks a button and the next bit replaces what was there, and so on through a "list" of items.
There are lots of readers out there, but they all operate automatically. (Like the Ajax ticker from dynamicdrive.)
There's a big debate [ajaxian.com] about which is better.
For me, JSON is better for AJAX, but XML is far, far better for sending complex stuff between servers. I will often transfer the data from one server to another in XML (like RSS), then create JSON objects to the local services from the data exchange.
It is just a lot simpler to send stuff either in JSON, or a simple string than to have to deal with XML.
Galleries do what you want to do all the time.
Just have an onclick="" that calls a function that triggers an AJAX call. The callback can replace the text in the innerHTML of the <div>.