944,073 Members | Top Members by Rank

Ad:
Mar 24th, 2006
0

Calling Different Iframes in Page

Expand Post »
I want to put about 7 different RSS news feeds in a page. Rather than make an indivdiual page for each I was hoping to have links at the top that as such: World News, US News, Sports, Etc. Those will act as links so when they click on them that specific news feed will appear below, but the page will not reload. They have to be able to switch between news feeds and load a new one. I'm not even sure what to call this code so its been hard to look. Any suggestions or know of any code for this?
Thanks.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kgonsalv is offline Offline
2 posts
since Mar 2006
Mar 24th, 2006
0

Re: Calling Different Iframes in Page

To handle the content switching, I recommend you look into AJAX. This means using the javascript XmlHttpRequest object. There are a few popular AJAX function libraries out there to make it easier. I recommend the excellent one from Yahoo. Check out Yahoo's UI Library.
http://developer.yahoo.com/yui/index.html

Specifically, you want the Connection Manager -- this is Yahoo's AJAX class.
http://developer.yahoo.com/yui/connection/index.html

You'll have to play with the examples a bit to get the hang of it, but it is time spent well.

Before most modern browsers supported AJAX, the popular method was IFRAMES--like you are trying to do. You can make that work. All you need is to have your select list or links of RSS feeds change the 'src' attribute of the iframe. You can do this using getElementById, or simply use the normal window.location = "" method. This is not a complete solution, but enough hopefully for you to dig around for the full solution.

As for consuming RSS feeds, you may find my PHP examples helpful---if you use PHP that is. I have an RSS Consumption Example at http://www.troywolf.com/articles
Reputation Points: 36
Solved Threads: 6
Posting Whiz
Troy is offline Offline
354 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Loading Frame
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: javascript radio buttons and insanity





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC