Hi,
I am looking to create loads of iframes from an rss feed. In other words, display each page linked in the LINK field of the rss will be displayed in a seperate IFrame. I am reasonably new to this and am not really sure how to do this. How may I go about doing this?
With firefox you can put the source code into an IFRAME and then paste it into a textarea or other form input, go from there to mainpualte the code ex:
address-
view-source:http://www.webdeveloper.com/forum/showthread.php?t=216944
With IE, (this was posted the other day) can activeX the source code directly to manipuate the code as a string.
With the srouce code now ready to work, its only a matter of identifying where to split() the string
var q=x.split('<title>');
var p=x.split('<link>');
var n=x.split('Time:');
var m=x.split('More in</span>'); //http://www.youtube.com/watch?v=_tR8bORL91A
var f=x.split('<img alt="" src="'); //var w='watch'; var wp='watch_popup';
This last bit of code I ripped out of my own project to re-write youtube rss pages. I don't use IFRAMEs, I put all the individual promos into table cells. When you get to know what you are doing, some RSS feeds are laid out different than others. Hence, your code will not work on all of them.
With firefox you can put the source code into an IFRAME and then paste it into a textarea or other form input, go from there to mainpualte the code ex:
address-
view-source:http://www.webdeveloper.com/forum/sh...d.php?t=216944
With IE, (this was posted the other day) can activeX the source code directly to manipuate the code as a string.
With the srouce code now ready to work, its only a matter of identifying where to split() the string
var q=x.split('<title>');
var p=x.split('<link>');
var n=x.split('Time:');
var m=x.split('More in</span>'); //http://www.youtube.com/watch?v=_tR8bORL91A
var f=x.split('<img alt="" src="'); //var w='watch'; var wp='watch_popup';
This last bit of code I ripped out of my own project to re-write youtube rss pages. I don't use IFRAMEs, I put all the individual promos into table cells. When you get to know what you are doing, some RSS feeds are laid out different than others. Hence, your code will not work on all of them.
Thanks for the reply. Looks great. Have just tested quickly and im afraid I do not quite understand how to use the split. I am new to all this. SO jus to clarify, if I get this split working, it should display lots of different IFRAMES containing the web pages linked in the LINK fields of the RSS?
sorry, that would take quite a bit more effort.
But the tool I gave is something to get you started.
provide the specific RSS address and I'll see what can be done?
sorry, that would take quite a bit more effort.
But the tool I gave is something to get you started.
provide the specific RSS address and I'll see what can be done?
Hmmm, so you wish to have individual IFRAMES holding the link
and descriptions? You want the links to open a new window or
display the page in those IFRAMEs?
I imagine the IFRAMEs will be something just big enough to hold the relevant HTML 400x300
Hmmm, so you wish to have individual IFRAMES holding the link
and descriptions? You want the links to open a new window or
display the page in those IFRAMEs?
I imagine the IFRAMEs will be something just big enough to hold the relevant HTML 400x300
Kind of. I wish to have individual iframes holding the pages referenced as the link in the RSS. Thanks for all ur help.
Well, here is to get started. With any other browser than IE, this is the clumsy way to do it. Its good this way, you may be able to see what is going on with the steps. The tool i gave above would eliminate all this, if this is for local application and IE only. I'm only grabbing the links and putting them into an Array (zLinks). You can then refer to their index to point your IFRAMEs to them.
Paste the source code into the textarea and then click outside to fire the onchange event.
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE>Su8-49am20</TITLE><META http-equiv=Content-Type content="text/html; charset=UTF-8"><STYLE type=text/CSS></STYLE><SCRIPT type="text/javascript">
var page='http://www.bukisa.com/rss/people/serioussamp';
var zLinks=new Array();
function abc(x){
var p=x.split('<link>');
var q=''
for(i=0;i<p.length;i++){
if(p[i]){zLinks[i]=''+p[i].substring(0,p[i].indexOf('<'))+''}
}
for(j=0;j<zLinks.length;j++){q+="zLinks["+j+"]='"+zLinks[j]+"';<br>";}
document.getElementById('linqs').innerHTML=q;
}
</SCRIPT><META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD><BODY scroll="auto"><div id="linqs" >zLinks=new Array()</div><SCRIPT type="text/javascript">
if(navigator.appName!='Microsoft Internet Explorer'){ //FIREFOX
document.write('<iframe src="view-source:'+page+'" style="height:30px;width:60px"></iframe> Select all, copy & paste into textarea')
}
else{ document.write('<iframe src="'+page+'" style="height:30px;width:60px"></iframe> right click to view source. select all, copy & paste into textarea')}
</SCRIPT><textarea id="tx" style="height:80%;width:100%" onchange="abc(this.value)"></textarea></BODY></HTML>
Wow this is great! If I can get it into an array I can easily take it from there. Just a couple of things, this returns the following which includes the 3 bad URLs. I can see why this is happening, and totally undertasnd that. Is it possible to skip first 3 when doing a loop?
How can I use this to automatically retrieve the XML?
Bookmarks