Solved

Page reloading info

Posted on 2011-09-17
4
256 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

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…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

617 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