Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Page reloading info

Posted on 2011-09-17
4
Medium Priority
?
269 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
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
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:
Gurvinder Pal Singh earned 2000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

926 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