Advertisement

09.07.2008 at 01:00AM PDT, ID: 23709779
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.1

I have a problem with refreshing login membership page on the master page.

Asked by mathieu_cupryk in Asynchronous Javascript and XML (AJAX), JavaScript, .NET

If you goto omegalove.com and log in with username macupryk and password cupryk
and press login nothing happens. But if u press refresh it will login.
I need the login to take the page to profile.aspx and I don't want to have this issue with refreshing the page.
See master page attached snippet.
---------------------------Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
<script type="text/javascript">
// These functions here are mearly for a "WOW" factor. They have nothing
// to do with ASP.NET AJAX. The ASP.NET AJAX functionality is below.
 
var hideTimerID = 0;
 
//function showLogin() {
//	clearTimeout(hideTimerID);
 
//	$get("login-link").style.visibility = "hidden";
 
//	$get("login-panel").style.visibility = "visible";
 
//	$get("userName").focus();
 
//	// Hide the login panel after 30 seconds.
//	hideTimerID = setTimeout(hideLogin, 30000);
//}
 
function hideLogin() {
	$get("login-link").style.visibility = "visible";
 
	$get("login-panel").style.visibility = "hidden";
 
	// Blank out the username and password for security reasons.
	$get("userName").value = "";
 
	$get("password").value = "";
}
 
function checkForEnter(e) {
	if (!e) e = window.event;
 
	if (e && e.keyCode == 13) {
		loginButton_Click();
	}
}
	</script>
 
<script type="text/javascript">
// Now we are in the actual ASP.NET AJAX implimentation. These are some very
// simple JavaScript methods that will tap into the ASP.NET AJAX Framework.
 
function errorCallback(error) {
	alert(error.get_message());
}
 
function loginCallback(loggedIn) {
	hideLogin();
 
	if (loggedIn == false) {
		alert("The username and password you supplied is invalid.");
	}
}
 
function loginButton_Click() {
    Sys.Services.AuthenticationService.login($get("userName").value, 
	$get("password").value,	$get("rememberMe").checked, null, location.href, loginCallback, errorCallback);
}
 
function logoutButton_Click() {
	Sys.Services.AuthenticationService.logout(location.href, null, errorCallback);
}
</script>
 
</head>
 
<body>
     <ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" />
 
     <form runat="server">
   
    
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    
    <tr>
    <td colspan="3" class="pagetop">
        <table width="100%" border="0">
        <tr>
        
        <td style="height: 17px">
             <asp:HyperLink ID="HyperLink1" Runat="server" ImageUrl="~/images/omegalovelogo.jpg" NavigateUrl="~/default.aspx"></asp:HyperLink>
        </td>
        
        <td valign="bottom" align="right" style="height: 17px"> 
       
 
        <div id="loginbox">
       <asp:LoginView ID="LoginView1" runat="server">
				<AnonymousTemplate>
					<div id="login-panel" style="visibility: visible;">
						
						<fieldset onkeydown="checkForEnter();" style="border-style: none;">
							<label>
								User Name:<input type="text" id="userName" /></label>
							<label>
								Password:<input type="password" id="password" /></label>
							<asp:ImageButton ImageAlign="Middle" ID="Submit" runat="server" AlternateText="Login"
                                 CommandName="Login" ImageUrl="~/Images/login_btn.jpg"
                                 onClientclick="Javascript:setTimeout(loginButton_Click, 0); return false;"/>	
                            <label class="checkbox" for="rememberMe">
								<input type="checkbox" id="rememberMe" checked="checked" />Remember Me</label>				
                            &nbsp;|&nbsp;<asp:HyperLink ID="lnkPasswordRecovery" runat="server" NavigateUrl="~/PasswordRecovery.aspx">Forgot password?</asp:HyperLink>
                            
						</fieldset>
					</div>
				</AnonymousTemplate>
				<LoggedInTemplate>
				      <div id="welcomebox">
                  <asp:LoginName ID="LoginName1" runat="server" FormatString="Hello	{0}" /><br />
                  <small>
                  <%--<asp:HyperLink ID="lnkProfile" runat="server" Text="Edit Profile" NavigateUrl="~/EditProfile.aspx" /><br /> 
                  --%><asp:LoginStatus ID="LoginStatus1" Runat="server" />
                  </small>
               </div>
			</LoggedInTemplate>
			</asp:LoginView>
        </div>         
   
        </td>
        
        </tr>
        
        </table>        
        
        <div id="nav_header">
            <ul>
                <asp:Repeater ID="TopMenuRepeater" runat="server" DataSourceID="SiteMapDataSource"
                    EnableTheming="True">
                    <ItemTemplate>
                        <li>
                            <asp:HyperLink ID="MenuLink" runat="server" NavigateUrl='<%# Eval("Url") %>'><span><%# Eval("Title") %></span></asp:HyperLink>
                        </li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
    </td>
    </tr>
    
    <tr>
   
    <td class="pageleft" style="height: 525px">
<%--        <uc1:NavigationTree ID="NavigationTree1" Runat="server" />
--%>    </td>
    
    <td class="pagecenter" style="height: 525px">
    <asp:contentplaceholder id="ContentPlaceHolder1" runat="server"><br />
        </asp:contentplaceholder>
        </td>
   
    <td class="pageright" style="height: 525px">
        <br />
         
        <uc4:Search ID="Search" Runat="server" />
         &nbsp;
         <uc8:FeatureMember ID="FeatureMember" Runat="server" />
         
        <br />
    </td>
    
    </tr>
    
    <tr>
    
    <td colspan="3"> 
 
     <div id="Div1">
      <div id="footer_nav">
			     <asp:Menu runat="server" ID="Menu1" DataSourceID="SiteMapDataSource" StaticDisplayLevels="1" MaximumDynamicDisplayLevels="0" Orientation="Horizontal">
			    </asp:Menu>
	  </div>
       <div id="footertext">
           <small>Copyright &copy; 2008 Mathieu Cupryk &amp; <a href="http://www.omegalove.com">OmegaLove</a><br />
           </small>
       </div>       
    </div>
    <br />
 
    </td>
    
    </tr>
    
 </table>
        <asp:SiteMapDataSource ID="SiteMapDataSource" runat="server" ShowStartingNode="False" />
 </form>
 
</body>
</html>
 
Loading Advertisement...
 
[+][-]09.09.2008 at 11:00AM PDT, ID: 22430341

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Asynchronous Javascript and XML (AJAX), JavaScript, .NET
Sign Up Now!
Solution Provided By: ziffgone
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628