I'm trying to develop a web site with using Jquery Mobile. I have 2 pages now. First page is Login Page and the other page is "I forget my password" page. In the Login page, i have a hyperlink which navigates to the "I forget my password" page. In the login
page, all controls work properly but when i click the hyperlink, "I forget my password" page opens. In this page i have a button which sends user's password via e-mail, however, this button cannot work. When i click this button, it directs me to previous page
which is "Login Page". I dont use any direction for this button. When i debug the program, the program cannot enter button's click event when i click the button. It just returns me previous page. I added this sample project. Please help me about this error.
Unfortunately I do not know "dope slap" and how i can allow anonymous access with c# code. Can you explain them ? In the "I forgot my password" page, i did not use any direction. Button's click event is empty.
By the way i found something about this problem. I used two js documents as <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js">
</script> in this page. When i make them as comment, the button works properly. But the design of the page is not good. I think the problem occurs because of the js documents. How can i solve it ?
ulasgulec
None
0 Points
4 Posts
Jquery Mobile Button Click Event
Dec 18, 2012 11:54 AM|LINK
Hi,
I'm trying to develop a web site with using Jquery Mobile. I have 2 pages now. First page is Login Page and the other page is "I forget my password" page. In the Login page, i have a hyperlink which navigates to the "I forget my password" page. In the login page, all controls work properly but when i click the hyperlink, "I forget my password" page opens. In this page i have a button which sends user's password via e-mail, however, this button cannot work. When i click this button, it directs me to previous page which is "Login Page". I dont use any direction for this button. When i debug the program, the program cannot enter button's click event when i click the button. It just returns me previous page. I added this sample project. Please help me about this error.
Login.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js"> </script> </head> <body> <form id="form1" runat="server"> <div data-role="page" id="page1"> <div data-theme="b" data-role="header" data-position="fixed"> <h3> ÇANKAYA TEKNOLOJİ </h3> </div> <div data-role="content"> <div data-role="fieldcontain"> <fieldset data-role="controlgroup"> <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="#000099" Text="Kullanıcı Adı:"></asp:Label><br /> <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtUserName" ErrorMessage="*" Font-Bold="True" ForeColor="Red" ValidationGroup="Login"></asp:RequiredFieldValidator> </fieldset> </div> <div data-role="fieldcontain"> <fieldset data-role="controlgroup"> <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="#000099" Text="Şifre:"></asp:Label><br /> <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtPassword" ErrorMessage="*" Font-Bold="True" ForeColor="Red" ValidationGroup="Login"></asp:RequiredFieldValidator> </fieldset> </div> <asp:Button ID="ButtonLogin" Text="GİRİŞ" data-theme="b" runat="server" onclick="ButtonLogin_Click" ValidationGroup="Login" /> <div> <br /> <asp:HyperLink ID="HyperLink2" data-transition="fade" runat="server" NavigateUrl="~/SifreUnut.aspx" CssClass="fs12">Şifremi unuttum</asp:HyperLink><br /><br /> </div> <asp:Label ID="LabelLoginMsj" runat="server" Font-Bold="True" ForeColor="#000099" Visible="False"></asp:Label> </div> </div> </form> </body> </html> Login.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Login : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LabelLoginMsj.Visible = false; } } protected void ButtonLogin_Click(object sender, EventArgs e) { try { LabelLoginMsj.Visible = true; //if(uye found) ////Login Operation //else LabelLoginMsj.Text="Please check username or password..."; } catch { } } } SifreUnut.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="SifreUnut.aspx.cs" Inherits="SifreUnut" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js"> </script> </head> <body> <form id="form1" runat="server"> <div data-role="page" id="page2"> <div data-theme="b" data-role="header" data-position="fixed"> <h3> ÇANKAYA TEKNOLOJİ </h3> </div> <div data-role="content"> <div data-role="fieldcontain"> <fieldset data-role="controlgroup"> <asp:Label ID="Label4" for="TextBoxEmailSifreUnut" runat="server" Font-Bold="True" ForeColor="#000099" Text="E-mail:"></asp:Label><br /> <asp:TextBox ID="TextBoxEmailSifreUnut" runat="server" AutoCompleteType="Email"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBoxEmailSifreUnut" ErrorMessage="*" Font-Bold="True" ForeColor="Red"></asp:RequiredFieldValidator> </fieldset> </div> <asp:Button ID="Button2" runat="server" onclick="Button1_Click" data-theme="b" Text="GÖNDER" ClientIDMode="Static"/><br /><br /> <asp:Label ID="LabelSifreGonder" runat="server" Font-Bold="True" ForeColor="Red" Visible="False"></asp:Label> </div> </div> </form> </body> </html> SifreUnut.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class SifreUnut : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { } } protected void Button1_Click(object sender, EventArgs e) { } }Thank you
Yanping Wang...
Star
14859 Points
1525 Posts
Microsoft
Re: Jquery Mobile Button Click Event
Dec 21, 2012 07:20 AM|LINK
Hello,
I would like to suggest you visit http://jquerymobile.com/ or repost http://forum.jquery.com/jquery-mobile the forum dedicated to discuss mobile device development.
best regards,
Feedback to us
Develop and promote your apps in Windows Store
bruce (sqlwo...
All-Star
36656 Points
5438 Posts
Re: Jquery Mobile Button Click Event
Dec 21, 2012 04:00 PM|LINK
try a dope slap. your "I forgot my password" page needs to allow anonymous access, or it redirects to the login page.
ulasgulec
None
0 Points
4 Posts
Re: Jquery Mobile Button Click Event
Dec 24, 2012 08:43 AM|LINK
Thank you for reply,
I checked these web sites but actually i could not find any solution for my problem. Can you give closer examples ?
ulasgulec
None
0 Points
4 Posts
Re: Jquery Mobile Button Click Event
Dec 24, 2012 08:45 AM|LINK
First of all thank you for reply Bruce,
Unfortunately I do not know "dope slap" and how i can allow anonymous access with c# code. Can you explain them ? In the "I forgot my password" page, i did not use any direction. Button's click event is empty.
ulasgulec
None
0 Points
4 Posts
Re: Jquery Mobile Button Click Event
Dec 24, 2012 08:49 AM|LINK
By the way i found something about this problem. I used two js documents as <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script> <script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js"> </script> in this page. When i make them as comment, the button works properly. But the design of the page is not good. I think the problem occurs because of the js documents. How can i solve it ?