Now one Submit button is the default focused control. but I need to set the default focus to another imagebutton.
Here is the sample image "button"
<img style="vertical-align: top; border-style: none;" src="IconAdd.jpg" id="imbAdd" onclick="javascript:Add();" title="Click to Add" style="cursor:hand;" />
But i use
$(document).ready(function(){$("#imbAdd").focus();}
It doesn't work.
I hope i'm clear. i need to implement when I press Enter, i can trigger "click" event for this image "button".
Thanks
Solution:
I use
<input type="image" id="imbAdd" onclick="addEntry();return false;">
.. instead of the image link. and set
<form id="form1" defaultButton="imbAdd">
but this type button will cause submit which is not what I want. so i need to add "return false;" at the end "addEntry()" to make sure the image button will never cause any undesired submit.