Loading ...

jQuery Mobile Login Dialog Box | CodeAsp.Net

 

Comments (13)

Nick Hartley
Nick Hartley said:

This is tremendous - please keep them coming!

11/18/2010
 · 
 · Tim Eisenhauer likes this.
 
by
njhartley
Nick Hartley said:

This is tremendous - keep the Jquery Mobile tips coming.  Thanks.

11/18/2010
 · 
 · Tim Eisenhauer likes this.
 
by
teisenhauer
Thanks Nick!
4/23/2012
 · 
 
by
cian
cian said:

Hey,

Thanks for sharing, just wondering why you use a handler to do the login processing rather than using the loging page itself? Is it purely for seperation of concerns or am I missing something.

We do a lot of mobile sites and have had trouble in the past when a form redirects to another page to do the processing, some older handsets view this as a security breach.

Cheers, Cian

11/25/2010
 · 
 
by
teisenhauer
Using a handler for this is just one way of doing it. We like to use these since there are many instances where we are calling these handlers using jquery or some other type of javascript.
4/23/2012
 · 
 
by
Rania
Rania said:

Hi, I made two JSP pages one for login and the second contains entry fields. can I use the same JQuery with my JSPs?

Thanks

Rania

12/17/2010
 · 
 
by
teisenhauer
I'm no JSP programmer, though if it's a server-side language then, YES! .... ASPX, JSP, PHP ... they're all essentially rendering out an HTML page ... without the .htm or .html extensions. Its basically all the same stuff.
4/23/2012
 · 
 
by
JD
JD said:

Hi there,

I have followed all your instructions but didn't manage to get the screen UI that you said..

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="FullMobile._Default" %>
<!DOCTYPE html> 
<html> 
<head>
    <title>Page Title</title>
    <link href="/assets/scripts/jquery.mobile-1.0a2/jquery.mobile-1.0a2.min.css" rel="stylesheet" type="text/css" />
    <script src="/assets/scripts/jquery/jquery-1.4.4/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/assets/scripts/jquery.mobile-1.0a2/jquery.mobile-1.0a2.min.js" type="text/javascript"></script>
    </head> 

<body> 

<!-- start page -->
<div data-role="page">

	        <!-- start header -->
        <div data-role="header" data-nobackbtn="true">
            <h1>My Mobile App</h1>
            <a href="test.aspx" data-rel="dialog" class="ui-btn-right">Login</a>
        </div>
        <!-- end header -->
        
	<!-- start content -->
	<div data-role="content">	
	   <p>Page content.</p>		
	</div>
	<!-- end content -->

	<!-- start footer -->
	<div data-role="footer">
	   <h4>Page Footer</h4>
	</div>
	<!-- end footer -->
	
</div>
<!-- end page -->

</body>
</html>

 

12/26/2010
 · 
 
by
teisenhauer
yea, your are going to have make sure all your link and script URL paths actually lead to the files!
4/23/2012
 · 
 
by
user908311
user908311  said:

Hi,

thanks for the post.  Any ideas why Login.ashx gets appended to the url instead of showing the url of the redirected page?

i.e. instead of getting http://localhost:51690/Default.aspx i'm getting http://localhost:51690/Login.aspx#Login.aspx?

thanks

Matt

1/19/2011
 · 
 
by
Nanass
Nanass said:
J'ai le meme probleme. Est-ce que vous avez trouver la solution ???? merci
3/24/2012
 · 
 
by
teisenhauer
Sorry, don't know french!!
4/23/2012
 · 
 
by
teisenhauer
Matt, that's how jquery does it. Play with your complete URL paths to get it to work.
4/23/2012
 · 
 
by
rafael
rafael said:

have you had success with displaying  content from the server via a dialog? I have a form in a dialog and I want the message (returning from the server, after filling out the form) to display in a dialog box as well. do you know how this can be done?

3/9/2011
 · 
 
by
teisenhauer
You're going to be looking at doing some AJAX for this, sir.
4/23/2012
 · 
 
by
Tudor Hoinaru
Tudor Hoinaru said:

Hi, i had the same issue regarding the UI. My solution was to actually use the CDN hosted scripts from jQuery Mobile website (See section Download). Hope it helps!

5/9/2011
 · 
 · Tim Eisenhauer likes this.
 
by
Naveen
Naveen said:

HI,

can we  really use aspx pages on mobile using jquery mobile...

currently i am developing pages using html and jquery mobile....

5/20/2011
 · 
 
by
teisenhauer
Yes, you can use aspx pages in jquery mobile.
4/23/2012
 · 
 
by
Agmino Web Solutions
Exactly what I needed, thanks!!!
12/24/2011
 · 
 · Tim Eisenhauer likes this.
 
by
teisenhauer
Thanks Agmino!
4/23/2012
 · 
 
by
Rob
Rob said:
we are using jquery ajax post to a webmethod with the return from the server in a success flag. It works perfectly on jquerymobile. Hope this helps. From the page... Sample to get you going: $('._login').click(function () { usr = $('.username').val(); pwd = $('.password').val(); var jsonText = JSON.stringify({ username: usr, password: pwd }); $.ajax({ type: "POST", url: "Default.aspx/AuthenticateUser", data: jsonText, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { if (msg.d == "0") { //failed $('.login_dialog').dialog('close'); } else { //success $('.login_dialog').dialog('close'); } }): And in the code behind: <WebMethod()> Public Shared Function AuthenticateUser(ByVal username As String, ByVal password As String) As String Dim result As String = "0" If Membership.ValidateUser(username, password) Then FormsAuthentication.SetAuthCookie(username, False) If HttpContext.Current.User.IsInRole("Sales") Then result = "1" End If Return result End Function
5/28/2012
 · 
 
by
developerscode
Thankyou soooooooo much
6/7/2012
 · 
 
by
nanthakumar t
nanthakumar t said:
great sample! Exactly what I needed thank you so much. please keep more post like tat
7/10/2012
 · 
 
by
  • Name:*
  • Email:*
  • Website:
Type the characters you see in the image *

Top posts

Tim Eisenhauer's latest blog posts

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?