I have code that will do this in .net, but it is vb code. I believe it is just 1 line of VB code you need to set & a few lines of JS (if there is no underlying reason why this funciton should happen). Here is the code i have written (my javascript aint the best, but it works)...
-=VB=-
txtSearch.Attributes.Add("onkeypress", "testEnterKey('btnSubmit');")
-=Javascript=-
function testEnterKey(buttonToClick)
{ if (event.keyCode == 13)
{ event.cancelBubble = true;
event.returnValue = false;
document.all.btnSearch.click(); } }
------------------
Jeff - Webmaster/Admin - CoasterBuzz.com - Sillynonsense.com
DELETED!
You must be logged in to post