Hi,
my login procedure looks like this:
$("#btnLogin").click(function() {
var email = $("#email").val();
var pw = $("#pw").val();
$.get("../Admin/loginForum.aspx", { email: email, pw: pw, mem: "mem" },
function(data) {
$("#LogResponse").html(data.message);
$("#LogResponse").show();
if (data.success) {
$("#LogResponse").after('<span class="error">bla bla bla</span>');
}
}, 'json');
});
the html is:
<table id="tblLoginForum" class="News" width="100%">
<tr>
<td colspan="2"><b>Login Forum</b></td>
</tr>
<tr>
<td>
user name (Email)</td>
<td>
<asp:TextBox ID="email" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
password</td>
<td>
<asp:TextBox ID="pw" runat="server" TextMode="Password"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="btnLogin" runat="server" Text="login" Font-Bold="True" />
</td>
</tr>
<tr>
<td colspan="2" >
<div id="LogResponse"></div></td>
</tr>....
after the login is pressed and the $get returns with success,
the return data is placed in the right place and the messege below as well,
but if seems that the page is being refreashed after a few seconds and everything disappears
Can anybody tells me why? and what should I do to avoid it?
thanks