Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Dynamic updates
I need to know if I should use asp.net or Java for this. I would like to use
asp in general.

I need to have a function check to see if a variable is true or false and
update an icon. But I want it to either check when updated or every 3
seconds. I suppose it has to be somewhat client side scripting but is there 
a
way around this. As of now I use IFrames whith a refresh of 10 seconds, any
less will cause it to timeout. I kind of want it real-time or very near. It'
s
kind of like a status page for information in a database. Any suggestions?

Thanks

Report this thread to moderator Post Follow-up to this message
Old Post
Dev880
10-27-04 08:55 PM


Re: Dynamic updates
<html><body onload="checkImage();">
<script type="text/javascript">
function checkImage() {
document.images['x'].src='image.asp';
window.setTimeout('checkImage()',300);
}
</script>
<img name="x" src="">
</body>
</html>


Where image.asp looks like:

<%
If Second(Time) Mod 2 = 0 Then
sImage = "even.gif"
Else
sImage = "odd.gif"
End If
Response.Redirect sImage
%>

Ray at work

"Dev880" <Dev880@discussions.microsoft.com> wrote in message
news:D5E63A94-3D3F-4888-B946-448830187A24@microsoft.com...
>I need to know if I should use asp.net or Java for this. I would like to
>use
> asp in general.
>
> I need to have a function check to see if a variable is true or false and
> update an icon. But I want it to either check when updated or every 3
> seconds. I suppose it has to be somewhat client side scripting but is
> there a
> way around this. As of now I use IFrames whith a refresh of 10 seconds,
> any
> less will cause it to timeout. I kind of want it real-time or very near.
> It's
> kind of like a status page for information in a database. Any suggestions?
>
> Thanks



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-27-04 08:55 PM


Re: Dynamic updates
Whoops.  Make that 3000, not 300 in setTimeout.  :]

Ray at work

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:uo9JymEvEHA.2876@TK2MSFTNGP12.phx.gbl...
> <html><body onload="checkImage();">
> <script type="text/javascript">
> function checkImage() {
> document.images['x'].src='image.asp';
> window.setTimeout('checkImage()',300);
> }
> </script>
> <img name="x" src="">
> </body>
> </html>
>
>
> Where image.asp looks like:
>
> <%
> If Second(Time) Mod 2 = 0 Then
> sImage = "even.gif"
> Else
> sImage = "odd.gif"
> End If
> Response.Redirect sImage
> %>
>
> Ray at work
>
> "Dev880" <Dev880@discussions.microsoft.com> wrote in message
> news:D5E63A94-3D3F-4888-B946-448830187A24@microsoft.com... 
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Ray Costanzo [MVP]
10-27-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

ASP archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:43 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.