Results 1 to 2 of 2

Thread: rssticker.js: how can I open rss links in new window?

  1. #1
    Join Date
    Sep 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default rssticker.js: how can I open rss links in new window?

    I don't know much about javascript. I'm trying to open the rss links in a new window...any advice?

    Would i have to edit something in this portion of the javascript?


    Code:
    rssticker_ajax.prototype.initialize=function(){ 
    if (this.ajaxobj.readyState == 4){ //if request of file completed
    if (this.ajaxobj.status==200){ //if request was successful
    var xmldata=this.ajaxobj.responseXML
    if(xmldata.getElementsByTagName("item").length==0){ //if no <item> elements found in returned content
    document.getElementById(this.tickerid).innerHTML="<b>Error</b> fetching remote RSS feed!<br />"+this.ajaxobj.responseText
    return
    }
    var instanceOfTicker=this
    this.feeditems=xmldata.getElementsByTagName("item")
    //Cycle through RSS XML object and store each peice of an item inside a corresponding array
    for (var i=0; i<this.feeditems.length; i++){
    this.title[i]=this.feeditems[i].getElementsByTagName("title")[0].firstChild.nodeValue
    this.link[i]=this.feeditems[i].getElementsByTagName("link")[0].firstChild.nodeValue
    this.description[i]=this.feeditems[i].getElementsByTagName("description")[0].firstChild.nodeValue
    this.pubdate[i]=this.feeditems[i].getElementsByTagName("pubDate")[0].firstChild.nodeValue
    }
    document.getElementById(this.tickerid).onmouseover=function(){instanceOfTicker.mouseoverBol=1}
    document.getElementById(this.tickerid).onmouseout=function(){instanceOfTicker.mouseoverBol=0}
    this.rotatemsg()
    }
    }
    }
    Thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Please do a search, this question has been answered many times, for example: http://www.dynamicdrive.com/forums/s...ad.php?t=15887
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •