GMail JavaScript question

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

    GMail JavaScript question

    Hello Everyone,

    I'm designing a webpage and I want to add an effect similar to the one
    GMail uses when loading/reloading the inbox. If you'll notice, only
    the section of the page that displays the mailbox is actually
    reloaded. The rest of the page stays the same. Is this done via
    IFrames? If not, then how can I do something similar?

    Thanks in Advance,
    Anthony
  • Jim Ley

    #2
    Re: GMail JavaScript question

    On 10 Nov 2004 15:27:47 -0800, papillion@gmail .com (Papillion) wrote:
    [color=blue]
    >Hello Everyone,
    >
    >I'm designing a webpage and I want to add an effect similar to the one
    >GMail uses when loading/reloading the inbox. If you'll notice, only
    >the section of the page that displays the mailbox is actually
    >reloaded. The rest of the page stays the same. Is this done via
    >IFrames?[/color]



    Jim.

    Comment

    • Anthony Papillion II

      #3
      Re: GMail JavaScript question

      > http://jibbering.com/2002/4/httprequest.html[color=blue]
      >
      > Jim.[/color]

      Hi Jim,

      Thanks for the URL. I am still a bit confused though. I understand how to
      make requests in the formats discussed on the page you referred me to. But I
      still don't understand how only *part* of the page is being reloaded without
      touching the rest of it. Maybe I'm missing something subtle in the
      discussion on the page you sent me. But it doesnt seem to really answer my
      question.

      Thanks in Advance,
      Anthony


      Comment

      • Randy Webb

        #4
        Re: GMail JavaScript question

        Anthony Papillion II wrote:[color=blue][color=green]
        >>http://jibbering.com/2002/4/httprequest.html
        >>
        >>Jim.[/color]
        >
        >
        > Hi Jim,
        >
        > Thanks for the URL. I am still a bit confused though. I understand how to
        > make requests in the formats discussed on the page you referred me to. But I
        > still don't understand how only *part* of the page is being reloaded without
        > touching the rest of it. Maybe I'm missing something subtle in the
        > discussion on the page you sent me. But it doesnt seem to really answer my
        > question.[/color]

        User clicks a button to view a different email.
        Script makes an HTTPRequest to retrieve the information for the email.
        Script modifies the .innerHTML property of a DIV tag to be equal to the
        contents of the email.

        The HTTPRequestObje ct is what he referred to.
        ..innerHTML is covered in the group FAQ

        --
        Randy
        comp.lang.javas cript FAQ - http://jibbering.com/faq

        Comment

        • Dag Sunde

          #5
          Re: GMail JavaScript question

          "Anthony Papillion II" <papillion@gmai l.com> wrote in message
          news:1100134024 .WnSlEdwkSAurBk wcLlSi6g@terane ws...[color=blue][color=green]
          > > http://jibbering.com/2002/4/httprequest.html
          > >
          > > Jim.[/color]
          >
          > Hi Jim,
          >
          > Thanks for the URL. I am still a bit confused though. I understand how to
          > make requests in the formats discussed on the page you referred me to. But[/color]
          I[color=blue]
          > still don't understand how only *part* of the page is being reloaded[/color]
          without[color=blue]
          > touching the rest of it. Maybe I'm missing something subtle in the
          > discussion on the page you sent me. But it doesnt seem to really answer my
          > question.
          >[/color]

          You grab the container for the section you want to update,
          ie. a <div id='blabla'> by the help of .getElementById (...),
          and change its content with either .innerHTML =..., or
          by changing the nodes in the DOM-tree, with the result from
          the request.

          --
          Dag.



          Comment

          • Anthony Papillion II

            #6
            Re: GMail JavaScript question


            Dag Sunde <me@dagsunde.co m> wrote in message
            news:CcIkd.4328 $HA5.523205@jul iett.dax.net...[color=blue]
            > "Anthony Papillion II" <papillion@gmai l.com> wrote in message
            > news:1100134024 .WnSlEdwkSAurBk wcLlSi6g@terane ws...[color=green][color=darkred]
            > > > http://jibbering.com/2002/4/httprequest.html
            > > >
            > > > Jim.[/color]
            > >
            > > Hi Jim,
            > >
            > > Thanks for the URL. I am still a bit confused though. I understand how[/color][/color]
            to[color=blue][color=green]
            > > make requests in the formats discussed on the page you referred me to.[/color][/color]
            But[color=blue]
            > I[color=green]
            > > still don't understand how only *part* of the page is being reloaded[/color]
            > without[color=green]
            > > touching the rest of it. Maybe I'm missing something subtle in the
            > > discussion on the page you sent me. But it doesnt seem to really answer[/color][/color]
            my[color=blue][color=green]
            > > question.
            > >[/color]
            >
            > You grab the container for the section you want to update,
            > ie. a <div id='blabla'> by the help of .getElementById (...),
            > and change its content with either .innerHTML =..., or
            > by changing the nodes in the DOM-tree, with the result from
            > the request.
            >
            > --
            > Dag.[/color]

            Hi Dag,

            I get it now. Thanks everyone who replied. I think this should be pretty
            easy to get working.

            Anthony


            Comment

            Working...