PDA

View Full Version : Javascript question



ajfmrf
05-31-2012, 09:04 PM
http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/index.htm

John figured out this for me to reduce my file size tremedously and it works great.but I need more if javascript can do it?




<script type="text/javascript">
var feeds = {};
(function(){ // group 1
var feednames = ['yahooUS', 'reutersUS', 'cbsUS', 'bingUS', 'usatodayUS', 'cnnUS', 'dailynewsUS', 'newsweekUS', 'msnbcUS', 'timeUS', 'espnS', 'yasportsS', 'sportsillS', 'msnbcS', 'foxsportsS', 'usasportsS', 'nflS', 'mlbS', 'nbaS', 'deadspinS', 'huffingtonS', 'sportsviewS', 'howstuffworksT', 'infoworldT', 'newsweekT', 'usnewsUS', 'apW', 'wnW', 'technoratiT', 'sportingnewsS', 'mayoE', 'paradeE', 'usaoffE', 'cbsW', 'forbesT'];
for(var i = 0; i < feednames.length; ++i){
feeds[feednames[i]] = new rssdisplaybox(feednames[i], feednames[i] + 'id', 'someclass');
feeds[feednames[i]].set_items_shown(10); //show 10 entries from feed
feeds[feednames[i]].start(); //Required: start script
}
})();
</script>


How ever,I forgot that I need to use a few images and text bwtween each of the 'feednames'

Basicly I need to put


(<div>
<table class="side" border="0">
<tr>
<td class="sideleft">
<a name="reutersUS" href="http://www.reuters.com"> <img src="images/reuters.gif" border="0"></a>
</td>
<td class="sidecenter">
<a href="#list"><img src="images/top2.gif"></a>
</td>
<td class="sideright">
<span class="leftspan"> 2012 reuters.com
<span>
</td>
</tr>
</table>
</div>

this in for each feed changing the image website link and copyright note for each.It will allow me to use a internal jump to easily go to any feed a visitor
wants to without physically looking for it and also give my a link to the top of the page as well as a copyright for each feed for the feed owner.

I don't know af any way I can do this all with css but have gotten the yahoo and up arrow to show using css.

But it is also important the links are usable.

Can someone help me get this done........is it possible....

Here is what I have so far.
[BROKEN LINK REMOVED]

as you can see the dropdown won't work and the yahoo image and red up arrow are not linked-also the text copyright info is missing.Before I used John's "shortcut" It had this:
[BROKEN LINK REMOVED] working but a huge file to work with.I am hoping to simplify the table and its info to intergrate it to what I have in the other file to make it a bit easier and smaller if possible

Bud

ajfmrf
06-09-2012, 04:42 AM
No,one?

Okay,I presume this is something not possible or would be a lot of work

I will go ahead with using my original page without John's array because I have to have that div with its content after each displaybox

Thanks