I need to be able to read in a keystroke in middle of a function. All the help I have gotten before is only helpful if used in the form area. What I have is something like this:
function example()
{
...
...
checkkeystroke()
...
...
checkkeystroke()
...
...
checkkeystroke()
}
and
function checkkeystroke()
{
if (keystroke = esc)
{
esckeyhit = 1;
}
}
Overall, I need to have it so that a function is running, and if esc is pressed, then the function stops. This is the only way I have come up with a solution. Any help would be great.
Thanks,
Skills
function example()
{
...
...
checkkeystroke()
...
...
checkkeystroke()
...
...
checkkeystroke()
}
and
function checkkeystroke()
{
if (keystroke = esc)
{
esckeyhit = 1;
}
}
Overall, I need to have it so that a function is running, and if esc is pressed, then the function stops. This is the only way I have come up with a solution. Any help would be great.
Thanks,
Skills