How do I avoid using iFrame?

Discussion in 'JavaScript' started by SuPrAiCeR69, Jun 9, 2009.

  1. #1
    I have a widget which will be displayed on users websites, however the content must be loaded externally to allow me to update the content whenever I want.

    I want to avoid using an iFrame - how can I do this with AJAX?
    I have tried but it keeps saying security errors as I cannot load external from my site onto another.

    Any examples of how I can? (please include source code) I'm thinking maybe a JSON query...

    Thanks!
     
    SuPrAiCeR69, Jun 9, 2009 IP
  2. FDIM

    FDIM Member

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    maybe try server side scripting? Use "cUrl" to get content of external page for example. Or if content is plain text/html you could try using this function file_get_contents. check for it in phpjs org

    Cant use link to help you ...
     
    FDIM, Jun 14, 2009 IP
  3. James Barcellano

    James Barcellano Active Member

    Messages:
    114
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    James Barcellano, Jun 14, 2009 IP
  4. RyanDOT

    RyanDOT Member

    Messages:
    131
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #4
    ajax pageloader is great. find it on dynamicdrive
     
    RyanDOT, Jun 14, 2009 IP
  5. koolman

    koolman Peon

    Messages:
    76
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You may try KoolAjax : http://demo.koolphp.net/Examples/KoolAjax/index.php

    You may use the UpdatePanel of KoolAjax to load external page content and insert that content to DOM of current page ( run javascript of external page as well if there is ). Your external page should not contain <html><head><body> tags.
     
    koolman, Jun 17, 2009 IP
  6. manjifera

    manjifera Well-Known Member

    Messages:
    232
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    118
    #6
    use php file's with mod rewrite with image

    e.g getstat.php to image.png?page=ddsfsdf&ip= like wise!!
     
    manjifera, Jun 21, 2009 IP