See http://www.phileconsociety.org/Login/tabid/66/Default.aspx
If you want to implement the same style, read on.
Copy the script below in your login form.
<script language=javascript>
<!-- //
var eUserName = dnn.dom.getById("<%=txtUserName.ClientID%>")
function BodyOnLoad()
{
if (eUserName != null)
{
eUserName.focus();
eUserName.select();
}
}
function SelText()
{
if (eUserName.value == "[Type your user name]")
{
eUserName.value = "";
}
}
BodyOnLoad();
// -->
</script>
Make sure the dnn object is available in the client.
In my case since I'm using a custom login form I use the code below in my page load event handler
If ClientAPI.BrowserSupportsFunctionality(ClientAPI.ClientFunctionality.DHTML) Then
ClientAPI.RegisterClientReference(Page, ClientAPI.ClientNamespaceReferences.dnn)
End If
In case you dont want to edit your code behind inserting the code below in page header tags in page settings will do the trick.
<script src="/js/dnn.js"></script>
Sunday, December 17, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment