The blog has moved to http://jessehouse.com/ ... Many google searches point here so I am leaving it operational, but there will be no new posts.

Friday, September 25, 2009

Attribute "target" exists, but can not be used for this element.

These days I am all about valid xhtml and was surprised to receive this validation error when using the target attribute on an anchor tag.
Attribute "target" exists, but can not be used for this element.


I found a nice work around that does not involve window.open, using jquery we can hack the attribute on 'after' the dom has loaded.



Now instead of target='_blank' you can just use class='target-blank', if the browser does not support javascript it will not open in a new window but the link will still work - and we have our valid xhtml.

Resources

Wednesday, September 2, 2009

Procedure sp_droplogin, Line 93 Login is aliased or mapped to a user in one or more database(s)

Trying to remove a MSSQL login from a database server, recieve the following eror

Msg 15175, Level 16, State 1, Procedure sp_droplogin, Line 93
Login 'qa' is aliased or mapped to a user in one or more database(s). Drop the user or alias before dropping the login.

Solution: run this command to determine what alias or groups the login is associated with and then remove those; might be nice if they just added this to the error message?

sp_helpuser 'qa'