Grabing content from server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kerberos

    #1

    Grabing content from server

    I'd like to create a function that grabs some content from a server (html
    file) and puts this content into a DIV.
    This way I don't have to reload the whole page to update just a portion of
    the page.
    How can I do it?
    Thanks,

    --

    Kerberos.

    Faster, safer and smarter than default browsers. Fully-featured for privacy, security, and so much more. Get the faster, better Opera browser for free.


    http://www.auriance.com


  • Martin Honnen

    #2
    Re: Grabing content from server



    Kerberos wrote:
    [color=blue]
    > I'd like to create a function that grabs some content from a server
    > (html file) and puts this content into a DIV.[/color]

    What is wrong with
    <div>
    <iframe name="iframeNam e" width="100%" height="200"
    src="whatever.h tml"></iframe>
    </div>
    and then using links e.g.
    <a href="htmlFile. html" target="iframeN ame">link</a>
    or if you need scripting
    if (window.frames && window.frames.i frameName) {
    window.frames.i frameName.locat ion.href = 'htmlFile.html' ;
    }



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • Kerberos

      #3
      Re: Grabing content from server

      Em Tue, 18 Jan 2005 15:00:23 +0100, Martin Honnen <mahotrash@yaho o.de>
      escreveu:
      [color=blue]
      > What is wrong with
      > <div>
      > <iframe name="iframeNam e" width="100%" height="200"
      > src="whatever.h tml"></iframe>
      > </div>
      > and then using links e.g.
      > <a href="htmlFile. html" target="iframeN ame">link</a>
      > or if you need scripting
      > if (window.frames && window.frames.i frameName) {
      > window.frames.i frameName.locat ion.href = 'htmlFile.html' ;
      > }[/color]

      The problem with iframes is, beside the fact that frames in general are
      deprecated, that the content wraps inside the frame. Using a div, it
      extends to 100%.

      I've been using iframes so far, but I'm looking for another solution.
      Thanks,

      --

      Kerberos.

      Faster, safer and smarter than default browsers. Fully-featured for privacy, security, and so much more. Get the faster, better Opera browser for free.


      http://www.auriance.com


      Comment

      • Martin Honnen

        #4
        Re: Grabing content from server



        Kerberos wrote:

        [color=blue]
        > I've been using iframes so far, but I'm looking for another solution.[/color]

        The FAQ has
        <http://jibbering.com/faq/#FAQ4_38>
        and there is also the download behavior in IE/Win:
        <http://www.faqts.com/knowledge_base/view.phtml/aid/1268/fid/126>
        but all that is much weaker in terms of cross browser support compared
        to iframes, in particular when you want to load and render HTML.


        --

        Martin Honnen
        http://JavaScript.FAQTs.com/

        Comment

        • Kerberos

          #5
          Re: Grabing content from server

          Em Tue, 18 Jan 2005 17:19:26 +0100, Martin Honnen <mahotrash@yaho o.de>
          escreveu:
          [color=blue]
          > The FAQ has
          > <http://jibbering.com/faq/#FAQ4_38>[/color]

          Thanks! I found the XML HTTP Request object quite interesting. It's
          exactly what I was looking for, it even talks about Gmail ;)



          --

          Kerberos.

          Faster, safer and smarter than default browsers. Fully-featured for privacy, security, and so much more. Get the faster, better Opera browser for free.


          http://www.auriance.com


          Comment

          Working...