473,473 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Refreshing part of a HTML page with each request

Is it possible to only redraw a portion of an HTML page as part of a
request? With each request, I am updating number of results but do not
want to lose where you were in a page. I created anchors at different
parts of the page but even this is a bit jumpy. Is there any other way
to implement this?

Jul 23 '05 #1
9 4494
"Glenn" <gl*********@yahoo.com> wrote in
news:11**********************@f14g2000cwb.googlegr oups.com:
Is it possible to only redraw a portion of an HTML page as part of a
request?
Technically, yes, but that would be browser-specific behaviour
that would have to compare the 'prior page' with the 'current page',
and only redraw the changed portions. In other words, it's
not under your control.
With each request, I am updating number of results but do not
want to lose where you were in a page. I created anchors at different
parts of the page but even this is a bit jumpy. Is there any other way
to implement this?


Use server-side scripting. For example, have the page be
a PHP page, and initially serve the 'start page'. The user
makes a request, and the PHP script does some processing,
and presents the 'results page', which could be substantially
the same as the 'start page', but with a "summary of results".
If the "summary of results" is always at the top of the page,
then subsequent "requests" won't 'jump around', but always
just let the page display be the default.

Another possible option, which may not work in all browsers,
is to use PHP to output results as you do the processing, by
flushing the output buffer.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 23 '05 #2
Glenn wrote:
Is it possible to only redraw a portion of an HTML page as part of a
request?


You could include the updating portion within an an external resource
within an <iframe> or <object>, or use a scripting approach that makes
use of the proprietary XmlHttpRequest() object (which is supported among
several popular browsers) to request the data and access the DOM to
modify the document dynamically. However, with either approach, you
need to consider appropriate fallback mechanisms for user's that don't
support those features.

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://SpreadFirefox.com/ Igniting the Web
Jul 23 '05 #3
Glenn wrote:
Is it possible to only redraw a portion of an HTML page as part of a
request? With each request, I am updating number of results but do not
want to lose where you were in a page. I created anchors at different
parts of the page but even this is a bit jumpy. Is there any other way
to implement this?


As said before by Dave and Lachlan, the client-sides solutions are
restricted to particular browsers.

If it's not a problem for you, try a look at these :

Mozilla (XMLHTTPRequest API) :
http://jpspan.sourceforge.net/wiki/d...xmlhttprequest

MSIE (Remote Scripting) :
http://msdn.microsoft.com/library/de...tml/rmscpt.asp

Mozilla, MSIE, Opera, ... (JSRS) :
http://www.ashleyit.com/rs/main.htm
Jul 23 '05 #4
One example I found was at the following url:
http://funds.reuters.com/lipper/reta...ndscreener.asp

It updates just the result row as you make changes. Is this part of
the ASP technology or is it just javascript that is not making a
request with each request? Would this method not work for other
browsers?

Jul 23 '05 #5
Glenn wrote:
Is it possible to only redraw a portion of an HTML page as part of a
request? With each request, I am updating number of results but do not
want to lose where you were in a page. I created anchors at different
parts of the page but even this is a bit jumpy. Is there any other way
to implement this?


I have a similar type of requirement. I have been asked to put together a
set of pages that elicit information from a client wanting to order a
particular service. The sequence looks something like

Do you want A or B

If you want A are you an A1, A2, or A3

If you are an A2 then do you want to A2a, A2b or A2c

etc. Not dissimilar to an IVR system, where the subsequent menu items are
contingent on what went before.

Given that you only get to see a final form once you get to the end of the
sequence a one button per page form doesn't feel quite right. It seems to
be unaesthetic and have a low usability.

What I was looking for was something where I could populate the page with
the next section of the structured dialogue as the user made their
selection.

Any thoughts as to how one would do this (or whether it is a sensible thing
to do in the first place)?

--
Colin Walls
Removed the pink meat to mail me
Jul 23 '05 #6
Colin -
If there are not too many choices, I have seen others implement
solutions using dynamic html and javascript. In my case, there are too
many options. I need to go back to a server to run queries.

Jul 23 '05 #7
On 8 Feb 2005 12:02:47 -0800, "Glenn" <gl*********@yahoo.com> wrote:
Is it possible to only redraw a portion of an HTML page as part of a
request?


This is obviously both highly useful and impossible / difficult

Google maps is doing it
http://maps.google.com/

And here's an analysis of how they've done it. Worth reading.
http://jgwebber.blogspot.com/2005/02...ng-google.html
Jul 23 '05 #8
You do it all in Flash. Every single element in a Flash file is
individually updateable.... ;-)

Jul 23 '05 #9
Using a iframe was one of the more complicated solutions I had. I am
using Servlets-JSP. One possibility was to have a invisible iframe.
In this iframe would be a form with a hidden input field. I would
actually submit the form in the invisible iframe. I would need
javascript to have the actual UI components on the page update the form
in the invisible iframe. I would also need dynamic html for the number
of results and the selections. My concerns were whether it would work
as expected and work on most browsers. I would like make sure you are
returning to where you were on the page.

That was an interesting read. The flash solution also sounded
interesting.

Andy Dingley wrote:
On 8 Feb 2005 12:02:47 -0800, "Glenn" <gl*********@yahoo.com> wrote:
Is it possible to only redraw a portion of an HTML page as part of a
request?


This is obviously both highly useful and impossible / difficult

Google maps is doing it
http://maps.google.com/

And here's an analysis of how they've done it. Worth reading.
http://jgwebber.blogspot.com/2005/02...ng-google.html


Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Philo Del Middleston | last post by:
I've been searching, but apparently not phrasing my search right, so I'm going to float a question out here in the meantime... I'm wondering how to go about refreshing the content of a control...
4
by: Nathan Sokalski | last post by:
When form data is submitted to an ASP page using the POST method, it is not visible in the URL, but it is still resubmitted if the user clicks the Refresh button. This can cause statistical data to...
3
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
5
by: Jensen Bredal | last post by:
Hello, I need to display self refreshing information on a web page written with asp.net. I would image that the info would be displayed either as part of a user control or a web control. How can...
1
by: Harlan Messinger | last post by:
If I have a dropdown list ddl, and the following code appears in Page_Load, then on each postback the rows previously added persist and I wind up with more and more copies of the same rows. To...
3
by: user | last post by:
Hi, let's say a page loads on a browser. Without refreshing the page, multiple textboxes within the page gets real time data @ a few seconds interval. what is the logic behind to achieve...
4
by: Dan | last post by:
Hi, i'm not sure to understand the difference between refreshing the pagina by clicking on 'refresh' in the browser and a postback. What i think it is: Suppose a page with a form containing a...
5
by: chimambo | last post by:
Hi all, I have a problem with maintaining data without refreshing manually in my system. I have a system which carries data across several pages. But if a user wants to go back to the previous...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.