J
Jerry Camel
I am interacting with an OCX on the client side. In the Onload event of the page, I am checking a property of the OCX: Is the port open or closed.
If the port is open, I want a certain image to appear. If the port is closed, a different image.
Sounds pretty straight forward.
Since this is dependent upon a property of a client side component, I can't do this with VB .net on the server, right?
So I was trying to use vbscript on the client like this:
If Form1.CardReader.PortOpen = True Then
Document.getElementById("lblPortStatus").innerText = "Card reader is active."
Document.getElementById("imgStatus").setAttribute("src", "images/CR_On.jpg")
Else
Document.getElementById("lblPortStatus").innerText = "Card reader is NOT active."
Document.getElementById("imgStatus").setAttribute("src","images/CR_Off.jpg")
End If
What I've kinda figured out is that I can't really just change the src text 'cause I'm already at the client. So how do I have the images "cached" so that I can change the src dynamically? Or am I completely misunderstanding the problem?
Any help is appreciated. Thanks.
Jerry
If the port is open, I want a certain image to appear. If the port is closed, a different image.
Sounds pretty straight forward.
Since this is dependent upon a property of a client side component, I can't do this with VB .net on the server, right?
So I was trying to use vbscript on the client like this:
If Form1.CardReader.PortOpen = True Then
Document.getElementById("lblPortStatus").innerText = "Card reader is active."
Document.getElementById("imgStatus").setAttribute("src", "images/CR_On.jpg")
Else
Document.getElementById("lblPortStatus").innerText = "Card reader is NOT active."
Document.getElementById("imgStatus").setAttribute("src","images/CR_Off.jpg")
End If
What I've kinda figured out is that I can't really just change the src text 'cause I'm already at the client. So how do I have the images "cached" so that I can change the src dynamically? Or am I completely misunderstanding the problem?
Any help is appreciated. Thanks.
Jerry