| | |
Calling Different Iframes in Page
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Solved Threads: 0
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.
Thanks.
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
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
![]() |
Similar Threads
- Odd Page Cannot Be Displayed Problem (All browsers, not just IE) (Windows NT / 2000 / XP)
- Email an aspx page (or any webpage you want) (ASP.NET)
- How to get auto calculated expiry date on lost focus event of registration date (ASP.NET)
- while function and "mysql_fetch_assoc() not a valid MySQL result resource" (PHP)
- update the page without changing it? (Site Layout and Usability)
- Home Page not recognized by browser (ASP)
- Explorer Caused An Invalid Page Fault (Windows 95 / 98 / Me)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Loading Frame
- Next Thread: javascript radio buttons and insanity
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate array automatically beta box browser bug calendar captchaformproblem cart checkbox close codes column createrange() css cursor date debugger decimal dependent design dom download dropdown element embed enter error events firefox focus form frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsfile jsp libcurl listbox maps masterpage media menu microsoft mimic mp4 onmouseover paypal php player position post problem programming progressbar prototype redirect regex runtime safari scale scriptlets search security select size software sql text textarea unicode w3c website window windowofwords windowsxp





