SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    RSS on client side

    Hey all,

    I have a perplexing problem I have been working on for a bit.

    I want to create a 'banner' that can be distributed to affiliates which includes text from an RSS feed.

    Since we are distributing it to many people, the code needs to be self contained and can't rely on server side programming.

    I also don't want to rely on one of these services which takes a js link and does the processing for you.

    Given that, I think javascript is the answer, but I cannot seem to find a stand alone script which will accomplish this.

    Any recommendations for a free script?

    Thanks!
    Compwizard
    "There are 10 kinds of people in this world -- those who know binary, and those who don't."

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not sure that your task is in the realm of what Javascript is capable of, due to security restrictions - unless the site that the user will be visiting is in the same domain as where you are hosting the RSS. Im gonna guess it's not.

    Back to server code

  3. #3
    SitePoint Evangelist compwizard's Avatar
    Join Date
    May 2002
    Location
    United States
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, it will definitly not be in the same domain.

    What implications does that have? I know there may be some cross-scripting issues, but I have seen this done before, so I know there is a way, I am just not sure how.
    Compwizard
    "There are 10 kinds of people in this world -- those who know binary, and those who don't."

  4. #4
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you're planning is possible but you will need a server and some server-side processing to handle the RSS feed. You probably won't find a free script to do it. You either need to develop it yourself, or hire a good developer (<plug>contact me if you like!</plug>)

    You won't be able to use XMLHttpRequest since that is limited to the domain that served the page. Your other choices of cross-site communication are therefore:

    1. An IFRAME, or
    2. Adding a remote JS file to the HEAD of the page after it has loaded.

    Which ever method you employ will then rely on server-side processing to return an appropriate message, e.g. text from an RSS feed.

    Hope that helps.


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
  •