Master page Enter key as Sumbit


M

Madison

Hi All,
I have web application in Framework 2 with master page which have this code
in body tag <body
onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;}"> this codes
work very nicely all the pages except Search page. The users want to be able
to type some thing in any textboxes then hit Enter key which trigger Search
button without press Search button. Since this page is using master page then
the Enter key is not working.
Any ideas to make it to submit without press enter.

Thanks.
 
Ad

Advertisements

R

rob^_^

Hi Mad,

Here is a snippet of a web control that is embedded in our master

<div id="cim_tools" >

<!-- Modified for HSNet -->

<div class="links">

></asp:label>

&nbsp;::&nbsp;<asp:LinkButton id="lnkLogout" runat="server" Font-Bold="true"
causesvalidation="false">Logout</asp:LinkButton>

</div>

<div class="search">

<label for="cim_search-text">search</label>

<asp:textbox id="txtSearch" ToolTip="Search HSNet" AccessKey="4"
runat="server" CssClass="TextBox" EnableViewState="true"></asp:textbox>

<asp:button id="cmdSearch" cssclass="Command" runat="server" text="Go"
EnableViewState="true" UseSubmitBehavior="true"></asp:button>


<a href="../search.aspx" >Advanced</a>

</div>

</div>



Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top