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
Wednesday, October 04, 2006
Blogger Beta all labels selection
This is my first post, I'm more of a coder than a writer but I'll try to (etc2x) what's in my mind.
You can always, post comment with your suggestions and recommendations. Just don't give me a wild reaction.
Now lets go to the Code Sample part.
The script below will mimic the experience when you click a label in the All Labels section of blogger when you create a post. Call the script passing the label/tag.
Example
toggleTag('Scoters')
{
var eTags = "Get reference to your label input object";
if (eTags != null)
{
// Search if tag is already in the list if not add
var sOldTags = ';' + eTags.value.replace(/; /g,';') + ';';
if (sOldTags != ';;')
{
if (sOldTags.toLowerCase().match(';' + sTag.toLowerCase() + ';') == null)
{
var sNewTags = sOldTags.replace(/;/g,'; ') + sTag;
eTags.value = sNewTags.substr(2);
}
}
else
{
eTags.value = sTag;
}
}
}
a s t a l a v i s t a
You can always, post comment with your suggestions and recommendations. Just don't give me a wild reaction.
Now lets go to the Code Sample part.
The script below will mimic the experience when you click a label in the All Labels section of blogger when you create a post. Call the script passing the label/tag.
Example
toggleTag('Scoters')
or
<a href="javascript:toggleTag('vacation');void(0);">vacation</a>
THE CODE
function toggleTag(sTag){
var eTags = "Get reference to your label input object";
if (eTags != null)
{
// Search if tag is already in the list if not add
var sOldTags = ';' + eTags.value.replace(/; /g,';') + ';';
if (sOldTags != ';;')
{
if (sOldTags.toLowerCase().match(';' + sTag.toLowerCase() + ';') == null)
{
var sNewTags = sOldTags.replace(/;/g,'; ') + sTag;
eTags.value = sNewTags.substr(2);
}
}
else
{
eTags.value = sTag;
}
}
}
a s t a l a v i s t a
Subscribe to:
Comments (Atom)