Solved

Page reloading info

Posted on 2011-09-17
4
246 Views
Last Modified: 2012-05-12
I there Any way that some part of our webpage don't get refreshed just like facebook chat on pageload............ It shud remain as it was....
0
Comment
Question by:savsoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36553680
Its ajax only. Page doesn't get reload, only that certain div gets reloaded.

Also, you can store the info in cookies, and fetch it when the page reloads again
0
 

Author Comment

by:savsoft
ID: 36553718
gimme some related code please
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 36553721
0
 
LVL 3

Expert Comment

by:dkellner
ID: 36556438
There are several ways to do that.
AJAX is typically for these kind of things, but there is another road to follow: IFRAME techniques.  If you use an IFRAME which is hidden (stzle="display:none"), you can push any request to the server and get whatever it gives back.  Basically, IFRAME is a small webpage inside of a webpage.

Try this:
- insert an IFRAME element, src="myalert.php"
- write myalert.php so that it prints "<script> alert(time()) </script>"
- now insert a BUTTON that reloads your iframe  - in javascript it's "myiframe.location.reload()"

You have a button now that goes to the server which returns the current timestamp.
It's a demonstration of a client-server connection, WITHOUT reloading the page itself.
No external libraries, no AJAX, no nothing.

Of course, AJAX can do more for you but it's more complex too.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need HTML output in powershell line by line 3 36
How to create a table with buttons 3 31
CSS in HTML 5 52
Allow a tab area under the contents 1 24
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question