terpanther
MIS
First Web App, so please excuse me if this doesn't make sense. I've got an event for when the user presses a key (like enter) on several Form Fields (text entry). There are certain times I would like to make a decison on what to do based on what field they came from. Is there some way in the KeyPress event I can tell what Element they came from? I know in JavaScript the keyword Element refers to the tag that fired the event. Is their something similar in VBScript or do I have to pass the Element Name to the Client-Side Script?
For Example: onkeypress="KeyHandler"
sub KeyHandler
if window.event.keyCode = 9 then
exit sub
end if
*** Here is the Question ***
if window.event.keyCode = 13 then
if ???.name = txtDateField then
do something else
end if
end if
end sub
For Example: onkeypress="KeyHandler"
sub KeyHandler
if window.event.keyCode = 9 then
exit sub
end if
*** Here is the Question ***
if window.event.keyCode = 13 then
if ???.name = txtDateField then
do something else
end if
end if
end sub