Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
26 Points
70 Posts
Oct 16, 2008 01:13 PM|LINK
Where should I put the code, under which tab?
Here is the code:
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="ctrlWebUserLogin.ascx.vb" Inherits="TimssSolutionSite2004.ctrlWebUserLogin" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <%@ Register TagPrefix="Portal" TagName="Title" src="~/controls/DesktopModuleTitle.ascx"%> <portal:title id="Title1" runat="server" DisplayTitle="Account Login"></portal:title> <script type="text/javascript"> function clickButton(e, buttonid) { var bt = document.getElementById(buttonid); if (typeof bt == 'object') { //if(navigator.appName.indexOf("Netscape")>(-1)) //{ if (e.keyCode == 13) { bt.click(); return false; } // } // if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ // if (event.keyCode == 13){ // bt.click(); // return false; // } // } } } </script> <asp:panel id="pnlMain" runat="server"> <TABLE id="Table1" cellSpacing="0" cellPadding="2" border="0" runat="server"> <TR> <TD colspan="2"> <TABLE id="tblError" cellSpacing="0" cellPadding="12" border="1" runat="server"> <TR> <TD> <asp:Label id="lblLoginMsg" runat="server" BorderWidth="0px" EnableViewState="False" ForeColor="Black"></asp:Label></TD> </TR> </TABLE> </TD> </TR> <TR> <TD><LABEL for="<%=txtUserName.ClientID%>"> Email address</LABEL> <asp:Label id="lblUserName" runat="server" EnableViewState="False" cssclass="textlabelnormal" Visible="false">Email address</asp:Label></TD> <TD> <asp:TextBox id="txtUserName" runat="server" EnableViewState="False" autocomplete="ON" MaxLength="100" Width="130px"></asp:TextBox> <asp:Label id="lblErrorUserName" runat="server" ForeColor="Red" Visible="False">lblErrorUserName</asp:Label></TD> </TR> <TR> <TD><LABEL for="<%=txtPassword.ClientID%>"> Password:</LABEL> <asp:Label id="lblPassword" runat="server" cssclass="textlabelnormal" autocomplete="ON" Visible="False">Password</asp:Label></TD> <TD> <asp:TextBox id="txtPassword" runat="server" EnableViewState="False" Width="130px" MaxLength="20" TextMode="Password"></asp:TextBox> <asp:Label id="lblErrorPassword" runat="server" ForeColor="Red" Visible="False">lblErrorPassword</asp:Label></TD> </TR> <TR> <td> </td> <TD align="center"> <asp:CheckBox id="chkRememberMe" runat="server" EnableViewState="False"></asp:CheckBox> <asp:Label id="lblRemeberMe" runat="server">Remember me on this computer</asp:Label></TD> </TR> <TR> <td> </td> <TD align="center"> <TABLE> <TR> <TD> <asp:Button id="btnLogin" accessKey="L" runat="server" cssClass="AllButtons" Text="Login"></asp:Button></TD> <TD> <TABLE> <TR> <TD align="center"> <asp:HyperLink id="hlnkForgotPassword" runat="server" CssClass="smalllinks">I can't access my account</asp:HyperLink></TD> </TR> <TR> <TD noWrap align="center"> <asp:HyperLink id="hlnkNewAccount" runat="server" CssClass="smalllinks">Register</asp:HyperLink></TD> </TR> </TABLE> </TD> </TR> </TABLE> </TD> </TR> <TR> <TD noWrap align="center" colspan="2"></TD> </TR> </TABLE> </asp:panel>
Sushimdudi
Member
26 Points
70 Posts
Re: Highlight text in Textbox using javascript
Oct 16, 2008 01:13 PM|LINK
Where should I put the code, under which tab?
Here is the code:
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="ctrlWebUserLogin.ascx.vb" Inherits="TimssSolutionSite2004.ctrlWebUserLogin" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="Portal" TagName="Title" src="~/controls/DesktopModuleTitle.ascx"%>
<portal:title id="Title1" runat="server" DisplayTitle="Account Login"></portal:title>
<script type="text/javascript">
function clickButton(e, buttonid)
{
var bt = document.getElementById(buttonid);
if (typeof bt == 'object')
{
//if(navigator.appName.indexOf("Netscape")>(-1))
//{
if (e.keyCode == 13)
{
bt.click();
return false;
}
// }
// if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){
// if (event.keyCode == 13){
// bt.click();
// return false;
// }
// }
}
}
</script>
<asp:panel id="pnlMain" runat="server">
<TABLE id="Table1" cellSpacing="0" cellPadding="2" border="0" runat="server">
<TR>
<TD colspan="2">
<TABLE id="tblError" cellSpacing="0" cellPadding="12" border="1" runat="server">
<TR>
<TD>
<asp:Label id="lblLoginMsg" runat="server" BorderWidth="0px" EnableViewState="False" ForeColor="Black"></asp:Label></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD><LABEL for="<%=txtUserName.ClientID%>"> Email address</LABEL>
<asp:Label id="lblUserName" runat="server" EnableViewState="False" cssclass="textlabelnormal"
Visible="false">Email address</asp:Label></TD>
<TD>
<asp:TextBox id="txtUserName" runat="server" EnableViewState="False" autocomplete="ON" MaxLength="100"
Width="130px"></asp:TextBox>
<asp:Label id="lblErrorUserName" runat="server" ForeColor="Red" Visible="False">lblErrorUserName</asp:Label></TD>
</TR>
<TR>
<TD><LABEL for="<%=txtPassword.ClientID%>"> Password:</LABEL>
<asp:Label id="lblPassword" runat="server" cssclass="textlabelnormal" autocomplete="ON" Visible="False">Password</asp:Label></TD>
<TD>
<asp:TextBox id="txtPassword" runat="server" EnableViewState="False" Width="130px" MaxLength="20"
TextMode="Password"></asp:TextBox>
<asp:Label id="lblErrorPassword" runat="server" ForeColor="Red" Visible="False">lblErrorPassword</asp:Label></TD>
</TR>
<TR>
<td> </td>
<TD align="center">
<asp:CheckBox id="chkRememberMe" runat="server" EnableViewState="False"></asp:CheckBox>
<asp:Label id="lblRemeberMe" runat="server">Remember me on this computer</asp:Label></TD>
</TR>
<TR>
<td> </td>
<TD align="center">
<TABLE>
<TR>
<TD>
<asp:Button id="btnLogin" accessKey="L" runat="server" cssClass="AllButtons" Text="Login"></asp:Button></TD>
<TD>
<TABLE>
<TR>
<TD align="center">
<asp:HyperLink id="hlnkForgotPassword" runat="server" CssClass="smalllinks">I can't access my account</asp:HyperLink></TD>
</TR>
<TR>
<TD noWrap align="center">
<asp:HyperLink id="hlnkNewAccount" runat="server" CssClass="smalllinks">Register</asp:HyperLink></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD noWrap align="center" colspan="2"></TD>
</TR>
</TABLE>
</asp:panel>