I am trying to create a sidebar for a site that will allow a user to select an item from a drop down menu and show an RSS Feed. The feed will change depending on which item is selected from the list. I am not sure how to acomplish this, but my first thought was to use z-index and show/hide layers. I have one layer and the menu set up, but it will not allow me to change the feed displayed when a different menu item is selected. Does anyone know how I can acomplish this?
I have a live preview up of what I have gotten done so far. It’s located on the site, CHUD,
you have two options:
pre-load all the rss feeds (i’m assuming your
<ul>‘s in your example page are the HTML output of your RSS feeds?), hide them all when your document loads, and then reveal them as selecteduse AJAX to dynamically grab the selected feed information as your select box changes.
here’s a quick example of a javascript and jQuery version of doing the former:
html:
javascript:
jQuery:
to do option 2, your
onchangefunction would handle the AJAX loading. if you’re not that familiar with AJAX, and have a few feeds, option 1 is probably the easiest. (again, i’m assuming you have already parsed out your RSS as HTML, as that’s another topic altogether).