Groups | Blog | Home
all groups > vb.net controls > september 2005 >

vb.net controls : button problems


Joe
9/15/2005 1:06:45 PM
I have 5 submit buttons and various text boxes on a web page.

My problem is - I have for example a text box that says:
City:______ <btnLookupCity>

But when the user types in their city and hits <RETURN>, it pushes another
button on the page instead of the button right next to the text box.

I have messed with tabindex and other things and as far as I can tell - by
hitting return in any text box - it auto pushes the FIRST button placed on
the page.

How can I change this without re-laying out my page?

Joe
9/15/2005 1:35:05 PM
Here was my JS solution to this problem:
if (document.all)
{ document.onkeydown = function ()
{ var key_enter= 13; // 13 = Enter
if (key_enter==event.keyCode)
{
event.keyCode=0;
document.getElementById('SubMenuFile_btnLogin').click()
return false;
}
}
}
[quoted text, click to view]

AddThis Social Bookmark Button