APSX Code Behind Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Problem: I want a table row appear to flash.

How might i do this? I tried a do loop with a delay, but of course it is running on the server and the page does not get refreshed. Is there a way to do this without having to go back to the server

In the exe world i would just have a thread that sleeps 500 ms, then based on the current backcolor it woud change it, this would create a flashing type view.

Any ideas

Thanks Eric.
 
You'll need to do this in javascript. The basic technique is to write a
routine which switches the foreground and background formats based on the
current format values, it changes them each run through in order to produce
the flashing effect, then calls itself recursively using the .setTimeout
method of the window object. For a more complete (and, I think, overly
complex) exposition, see:

Dynamic HTML Web Magic, 1998, New Riders, by Jeff Rouyer. His web site is
http://www.htmlguru.com, but he doesn't seem to have the code samples posted
any more.

Eric said:
Problem: I want a table row appear to flash.

How might i do this? I tried a do loop with a delay, but of course it is
running on the server and the page does not get refreshed. Is there a way
to do this without having to go back to the server?
In the exe world i would just have a thread that sleeps 500 ms, then based
on the current backcolor it woud change it, this would create a flashing
type view.
 
Hi Eric,

You can try this I used a label in this sample, however I think it would not
be that much work for you to get a table row flashing

I hope this helps?

Cor

Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim scriptString As String = _
"<script language='JavaScript'>" & _
"setFlash();" & _
"function setFlash(){" & _
"if (document.all('Label1').innerText=='') {" & _
"document.all('Label1').innerText ='I flash';}" & _
"else{ document.all('Label1').innerText=''}" & _
"setTimeout('setFlash()',500)}" & _
"</script>"
Page.RegisterStartupScript("setFlash", scriptString)
End Sub
 
Back
Top