GMail JavaScript question

P

Papillion

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
 
R

Randy Webb

Anthony said:
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.

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 HTTPRequestObject is what he referred to.
..innerHTML is covered in the group FAQ
 
D

Dag Sunde

Anthony Papillion II said:
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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top