J
JP
Hi Mike,
Thank You! I think this will get me what I am trying to
do. However, for the first attempt, it didn't work. I am
sorry, but I am still a new fish in the ocean of ASP.NET
and it would help if you could give more details on how to
use the code you gave.
This is what I did....
In the page load event I added the KeyDown event, but
changed the syntax to proper cases. Following is the exact
line I entered.
txtPassword.Attributes.Add("OnKeyDown", "return
TestForEnter()")
Now is a little confusing part for me, to add the script
in HTML codes. I added this <script></script> right after
<head></head>, not sure if that's okay!
<script>
function testForEnter() {
if (event.keyCode == 13)
{
document.all("imgLogin").click();
event.returnValue = false;
}
}
</script>
Now I run the app and for the password first character,
which is an upper case letter, I press SHIFT key and the
page's bottom left corner shows the yellow triangle
indicating an error. And the error is ...
Line: 80
Char: 1
Error: Object Expected
Code: 0
URL: http://localhost/NAVAlertData/Login.aspx
Line 80 on my HTML page is a </TR> ending tag and line 80
on my Login.aspx.vb (code behind) is commented out. So now
I don't know what to look for...
Please help....
Thanks a million again in advance!
JP
Thank You! I think this will get me what I am trying to
do. However, for the first attempt, it didn't work. I am
sorry, but I am still a new fish in the ocean of ASP.NET
and it would help if you could give more details on how to
use the code you gave.
This is what I did....
In the page load event I added the KeyDown event, but
changed the syntax to proper cases. Following is the exact
line I entered.
txtPassword.Attributes.Add("OnKeyDown", "return
TestForEnter()")
Now is a little confusing part for me, to add the script
in HTML codes. I added this <script></script> right after
<head></head>, not sure if that's okay!
<script>
function testForEnter() {
if (event.keyCode == 13)
{
document.all("imgLogin").click();
event.returnValue = false;
}
}
</script>
Now I run the app and for the password first character,
which is an upper case letter, I press SHIFT key and the
page's bottom left corner shows the yellow triangle
indicating an error. And the error is ...
Line: 80
Char: 1
Error: Object Expected
Code: 0
URL: http://localhost/NAVAlertData/Login.aspx
Line 80 on my HTML page is a </TR> ending tag and line 80
on my Login.aspx.vb (code behind) is commented out. So now
I don't know what to look for...
Please help....
Thanks a million again in advance!
JP