I am having one Web page(First window). In that page I am having one image button, Which is having OnClientClick event. In that event I call a javascript method as OpenHelpWindow() i.e.
OnClientClick ="OpenHelpWindow()"
Now whenever I clicked that image button the event in the javascript method(OpenHelpWindow()) will get trigger and it will open the New help web window. Its working properly but the problem is, When I press Enter key then also the event will get fire and show me the help window.
Now I want to stop the second window (Help window) opening when the Enter key pressed.
How can I resolve this problem?
My Code for the first web window Image button is,
.aspx code
.
.
<asp:ImageButton ImageUrl="~/Images/help.png" runat="server" ID="ibtnHelp"
AlternateText="Help" ToolTip="Help" OnClientClick="OpenHelpWindow()" />
.
.
Javascript code for OpenHelpWindow() is
function OpenHelpWindow()
{
var newWin = null;
try
{
newWin = window.open("../Common/OpenHelpUrl.aspx");
newWin.focus();
return false;
}
finally
{
newWin = null;
}
}