SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jan 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Combine elements from several sites in a single display

    Hi. At my job I constantly need to be up to the moment on the weather, and I want to create a display that will combine important elements from different weather services onto one screen that I can hang on the wall.
    What are need are basic <div>'s from several different sites. I know I could use iframes but I don't want to display entire sites, just the elements I need from them. Then I want to be able to have some DOM control over them (e.g. setting refresh time for each element).
    Any ideas on what would be the best way to go about this? Any suggestions would be greatly appreciated. Thanks!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    You might have to look into Ajax for that, but that would be a topic for the JavaScript forum. We could move this thread if you like.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Member
    Join Date
    Jan 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, I assumed some javascript would be involved, but I didn't know what forum would be appropriate. I've read that jQuery is good for DOM control but am still not sure what would be the best technique for doing this project. Please move this to the javacript forum if that would be better. Thanks.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    [Thread moved to JS forum.]
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  5. #5
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,684
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    Javascript doesn't allow you to work with other sites without their permission.

    With PHP though, you can use something called Curl to retrieve the contents of a web page, from which you can then retrieve the parts that you require.

    The typical technique is that an ajax request is sent to a PHP script, which retrieves the data and sends it back to your request.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •