1
Answer

how to modify javascript based on c# variable

Priyanka

Priyanka

10y
742
1

I only want to modify the javascript based on below requirement-

when the train is arrived, blink should start before 2 minute of arrival and when the train is departed, blink should continue till 2 mintue after departur.

Im getting "arrival time" and "departure time" from below code:

public partial class abc
{
public string arrival;
public string departure;
protected override void Display()
{
arrival = "14:06"; // arrival time is coming in this format
departure = "14:10"; //departure time is coming in this format
}
}
Java script I am using is:
<script type="text/javascript" language="javascript">
function doBlink() {
var blink = document.all.tags("BLINK")
for (var i = 0; i < blink.length; i++)
blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""
}
function startBlink() {
if (document.all && !isTimerInstalled)
setInterval("doBlink()", 1000);
isTimerInstalled = true;
}
</script>

Please reply how to modify my javascript based on requirement.

Please help
 
Answers (1)