473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Request Server Information Client Side

Hi

I am a bit of a novice with JS and this may seem like a completely
stupid question, but i want to be able to update a bit of text on a
page based on information from the server without reloading the page.

The only way i can think of doing such a thing is having an active
server page that returns an image, that is generated on the fly. As
long as there is no caching on the client this in theory will allow
the client to perform an action on the server and display an image
generated on the fly as a result of this action without actually
reloading the page, simply by requesting an image.

My question is, can you do anything like this with straight forward
text?

Cheers

Blu
Jul 23 '05 #1
3 3518
BluDog wrote:

I am a bit of a novice with JS and this may seem like a completely
stupid question, but i want to be able to update a bit of text on a
page based on information from the server without reloading the page.


Add a (hidden) iframe, when you want to get the information from the server,
change it's location to a server-side script with approriate query params.
The script should return a page containing a javascript function which in
turn sets the text in the main page e.g.

<html>
<body>
<script>
parent.document.getElementById("changeMe").value
="this came from the server";
</script>
</body>
</html>

HTH

C.
Jul 23 '05 #2
On Fri, 01 Oct 2004 11:36:31 +0100, Colin McKinnon
<co**************@andthis.mms3.com> wrote:
BluDog wrote:

I am a bit of a novice with JS and this may seem like a completely
stupid question, but i want to be able to update a bit of text on a
page based on information from the server without reloading the page.


Add a (hidden) iframe, when you want to get the information from the server,
change it's location to a server-side script with approriate query params.
The script should return a page containing a javascript function which in
turn sets the text in the main page e.g.

<html>
<body>
<script>
parent.document.getElementById("changeMe").valu e
="this came from the server";
</script>
</body>
</html>

HTH

C.


Ideal, Thanks Colin!
Jul 23 '05 #3
In article <67********************************@4ax.com>,
ne**@nospam.bludog.net enlightened us with...
Hi

I am a bit of a novice with JS and this may seem like a completely
stupid question, but i want to be able to update a bit of text on a
page based on information from the server without reloading the page.


You can use an image or a dynamic script element that references any code on
your server that returns the proper content type.

I've got an example with Perl here that uses a dynamic script element.
http://www.ipwebdesign.net/kaelisSpa...alidation.html

Someone (maybe Grant?) posted a real nice alternative that was more cross-
browser using an image src attribute awhile back. Look in the archives.

--
--
~kaeli~
If at first you don't succeed, skydiving is not for you.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4

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

Similar topics

2
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a...
6
by: Drew | last post by:
I have been trying to figure out why I am getting this message... I have an application that is 20 different ASP pages that works in sequential order (step1, step2, step3...). After each step the...
3
by: news.rcn.com | last post by:
How can I access the request and response object for a page using javascript. I want to stick some data on with something like request.setAttribute( "User's choice for later use" ). I can't seem...
7
by: someone | last post by:
Let's say I have a Session timeout of 20 minutes. If the browser periodically request a graphic file, will that keep its Session alive? What keeps the Session alive? Is it the Session cookie that...
8
by: Angel | last post by:
I am trying to access in Javascript within an ASP.NET web page the Request Object. I am specifically trying to access the values in the Request.QueryString. When I try to access the values I get an...
10
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
4
by: Jit Prasad | last post by:
I have a working client-side Vb.Net (.net v1.0) app that talks to a Webspere webservice on a windows 2000 server. The client side app runs on a citrix server, also a Windows 2000 server. The app...
3
by: Ed Sonneveld | last post by:
Hi, I have hosted my webservice at a hosting company and it has been working fine for 2 years now. The webservice is called by winforms clients over the internet, using the proxy class generated...
0
by: mpdoreilly | last post by:
Hi, I've a webservice that has several typical webmethods that clients call and get responses from. (Side note: The websriivce is actually to implement the server side of tr-069, the protocol...
2
by: Doogie | last post by:
Hi, I'm writing Javascript code to parse out a query string. I want to handle the case where a parameter value may not be sent. So consider a parameter called "State". If the user doesn't pass...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.