homepage Welcome to WebmasterWorld Guest from 54.227.141.230
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
News Box created locally and manually operated
click to read each successive item
Clair




msg:3399995
 2:25 pm on Jul 20, 2007 (gmt 0)

I think this is not complicated to implement, but I don't know the best direction to go in.

Client wants box on web page that has a news item in it, e.g.,

Mac's Market opening on June 20th.
Welcome!

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.

Clair

 

cmarshall




msg:3400091
 4:00 pm on Jul 20, 2007 (gmt 0)

To be honest, I have absolutely no idea what you're talking about. I'm a bit thick, so you need to speak slowly to me.

Could you possibly post a code sample or something?

Clair




msg:3400127
 4:50 pm on Jul 20, 2007 (gmt 0)

Marshall --

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.)

Thanks,
Clair

cmarshall




msg:3400189
 5:39 pm on Jul 20, 2007 (gmt 0)

Aw, heck. That's easy. However, the answer isn't really XML. It's JavaScript. You could get your feed as XML and parse it directly, or you can have the server deliver it as JSON, thus removing XML from the equation completely.

Clair




msg:3400554
 12:22 am on Jul 21, 2007 (gmt 0)

Marshall --

I have no idea what JSON is?

Could you elucidate -- and would such an operation be doable with an EXTERNAL JS file. I hate tons of JS on the home page?

Thanks again.

Clair

cmarshall




msg:3401142
 2:58 am on Jul 22, 2007 (gmt 0)

Well, JSON [json.org] stands for JavaScript Object Notation. It is a text-based data modeling syntax that can be fed to JavaScript from a server, and is handled directly by the language. It's often preferred by people who are doing AJAX [developer.com] work, as it is more directly relevant to JavaScript.

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>.

Clair




msg:3401220
 9:07 am on Jul 22, 2007 (gmt 0)

Thanks Marshall --

I have my work cut out for me -- but you've given me a lot to chew on, and at least some phrases to feed to google!

Thanks again.

Clair

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
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