Hi,
I put up a container that holds the login module and uses in its title a java script to change the content pane css attribute "visibility: hidden" to "visibility: visible" when the user clicks on it (The content pane is not shown before the click).
Here is the relevant code:
onmousedown="document.getElementById('contnetPane').style.visibility='visible'; document.getElementById(' contnetPane ').style.height='240px';" onmouseclick="document.getElementById(' contnetPane ').style.visibility='visible';document.getElementById('contnetPane ').style.height='22px';" >LOGIN</a>
My problem is that if the user failed to login and the page is refreshed in order to show the message of failed login, the module is again hidden and the user is not aware of the failure.
I want to put some conditional code in the ascx skin code that will change the attribute visibility of the element ' contnetPane' to 'visible' in that case.
I saw that the UserLoginStatus.loginFailure is indicating a login failure and may be it can do the trick but I do not see how to use it in the ascx skin.
Here is what I have so far in the skin:
(This code works and writes the string I put there but I do not know how to replace the code in the response to something that will change the attribute 'visibility' of the element ' contnetPane' to 'visible')
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Page.IsPostBack Then
Dim MyloginStatus As New DotNetNuke.Security.Membership.UserLoginStatus()
'Check the Login Status
Select Case MyloginStatus
Case MyloginStatus.LOGIN_USERNOTAPPROVED
Response.Write("MyloginStatus.LOGIN_USERNOTAPPROVED")
Case MyloginStatus.LOGIN_USERLOCKEDOUT
Response.Write("MyloginStatus.LOGIN_USERLOCKEDOUT")
Case MyloginStatus.LOGIN_FAILURE
Response.Write("MyloginStatus.LOGIN_FAILURE<br>")
Case Else
Response.Write("Something")
End Select
end if
End Sub
</script>
Any help will be appreciated.
Yehuda