forcing a page reload?

90 views
Skip to first unread message

WAZOO

unread,
Apr 29, 2004, 2:36:03 PM4/29/04
to

Sorry if this is obvious to everyone (except me). I've done a Google search
and I'm not seeing anything encouraging that addresses my issue.

My very large multispecialty medical practice needs to alert various nurses
and med techs - squirreled away in back offices - when an arrived parient
requires their services. It's a simple matter for me to implement a little
MSAccess database with +/- buttons to increment the arrivals queue.
MedTechs can look at this page and and see if they need to go out to the
waiting room to get a patient that requires their services.

I believe I can include something like:

<META HTTP-EQUIV="refresh" CONTENT="90">

in my HTML and cause the "client" to refresh every 90 seconds.

But, what I really want to do is force the page to reload at the nurse
stations only each time a change is made. I want to iterate through the
active sessions and execute something like:

Response.Write("<script language='javascript'>location.reload();</script>")

and cause the screen at the nurses' stations to refresh each time the girls
at the fromt desk queue up a patient for blood work or whatever.

Can anyone help us out with this?


Cor Ligthert

unread,
Apr 29, 2004, 3:52:16 PM4/29/04
to
Hi Wazoo,

If you do not get any better you can try this sample I once made.
This is a webclock and I think it take to much from your connection, however
when nothing helps, you can bring it down and let it fire more slow.

If you do not understand some things, feel free to ask.

I hope it helps anyhow?

Cor

\\\Form 1 Needs a imagebox on the page
' The application name has to be WebClock
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Image1.Height = New Unit(32)
Me.Image1.Width = New Unit(200)
Image1.Visible = True
Dim scriptString As String = "<script language=JavaScript>" & _
"setclock(); function setclock(){document.images.Image1.src = " & _

"'http://localhost/WebClock/WebForm2.aspx';setTimeout('setclock()',1000)}</s
cript>"
Page.RegisterStartupScript("setclock", scriptString)
End Sub
///
\\\Form2 needs nothing
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Response.Cache.SetExpires(DateTime.Now.AddTicks(500))
Dim myForeBrush As Brush = Brushes.Black
Dim myFont As New Font("Times New Roman", 8, FontStyle.Regular)
Dim textHeight As Single
Dim bm As New Bitmap(120, 20)
Dim g As Graphics = Graphics.FromImage(bm)
g.Clear(Color.White)
Dim textSize As SizeF = g.MeasureString("now.tostring", myFont)
g.DrawString(Now.ToString, myFont, myForeBrush, _
New RectangleF(0, 0, 120, 20))
Dim ms As New IO.MemoryStream
Dim arrImage() As Byte
bm.Save(ms, Imaging.ImageFormat.Bmp)
arrImage = ms.GetBuffer
Response.BinaryWrite(arrImage)
g.dispose
End Sub
///

bruce barker

unread,
Apr 29, 2004, 4:52:52 PM4/29/04
to
use a hidden frame to do the polling, and reload the parent only when there
is a change. this is a pretty lightweight, as the hiddenframe content is
very small.


-- bruce (sqlwork.com)

"WAZOO" <wa...@NOSPAM.nycap.rr.com> wrote in message
news:nWbkc.53760$X14....@twister.nyroc.rr.com...

Øystein Fallo

unread,
Apr 30, 2004, 3:19:57 AM4/30/04
to
> "WAZOO" <wa...@NOSPAM.nycap.rr.com> wrote :

> > But, what I really want to do is force the page to reload at the nurse
> > stations only each time a change is made. I want to iterate through the
> > active sessions and execute something like:
"bruce barker" <nospam...@safeco.com> wrote:
> use a hidden frame to do the polling, and reload the parent only when
there
> is a change. this is a pretty lightweight, as the hiddenframe content is
> very small.

Or you might consider using a webservice, download via xmlhttp through
javascript, and transform to html.
I've succesufully used this method using asp3.0...
rgds
Øystein Fallo


Reply all
Reply to author
Forward
0 new messages