Results 1 to 4 of 4

Thread: Remove feeds from gajaxpausescroller

  1. #1
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Remove feeds from gajaxpausescroller

    1) Script Title: gajaxpausescroller

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...sescroller.htm

    3) Describe problem:

    I use PHP to extract the feeds I want added to the scroller from a MYSQL database.

    I can add feeds ok, but I can't see a function that would allow me to remove feeds.

    I have tried re-setting the feed to its initial state (before any feeds were added) by writing a function, and calling it when a user clicks the appropriate button:

    Code:
    function removeFeeds() {
            this.linktarget=linktarget || "" //link target of RSS entries
    	this.feedlabels=[] //array holding lables for each RSS feed
    	this.feedurls=[]
    	this.feeds=[] //array holding combined RSS feeds' entries from Feed API (result.feed.entries)
    	this.feedsfetched=0 //number of feeds fetched
    }
    But it doesn't seem to have any effect.

    A separate issue is when I use the 'example2' css, if I add 3 or more feeds, the scroll function no longer works correctly - entries will scroll up and off the screen.

    I'm a complete newbie to Javascript, so any pointers would be greatly appreciated!

    TIA

    Neil

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

    Default

    Hmm there's no quick way to remove a feed from the scroller once it's initialized unfortunately. Not to say it's impossible, but thinking about it, the script has to be modified to support reinitialization after having removed the desired feed, which is rather extensive.

    As far as the "example2" issue, are you sure this isn't just a case of the container not being tall enough to accommodate all the feeds? By default it's 180px:

    Code:
    #example2{ /*Demo 2 main container*/
    width: 550px;
    height: 180px;
    border: 1px dashed black;
    padding: 4px;
    background-color: #EEEEEE;
    }
    DD Admin

  3. #3
    Join Date
    Nov 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi, and thanks for the reply.

    I can see how removing an individual feed could be tricky.

    Is there an easy way to reset the scroller to a totally empty state where no feeds are there, and to build the feed-list again from scratch?

    Everything I have tried leaves me with a 'transferring data from Google' message that never seems to complete.

    On the second item, I have increased the height to 400px and added 5 feeds to the scroller. It works for the first few 'scrolls', and then starts to behave erratically, scrolling a page up and out the 'window', closely followed by a 2nd page that comes to halt where it should.

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

    Default

    Hmm the issue all comes down to doing this without reloading the page, which is what's difficult. If you're ok with the page reloading, then one way this can be done is by passing some value via the URL parameter string, and based on that selectively load the feeds.

    Do you have an example to the problem as far as the height issue?
    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
  •