Last post Aug 02, 2013 08:03 AM by kashyapa
Member
229 Points
662 Posts
Mar 27, 2013 04:05 PM|ssvikramuk|LINK
Hello- I am using webmatrix c# razor for my web app with jquery 1.3 mobile. Jquery Popup works perfectly, but i need is whenever clicking on login button the text fields should be cleared and refresh it again.
<a href="#loginpopupMenu" data-rel="popup" data-role="button" data-transition="fade">Sign In</a> <div data-role="popup" id="loginpopupMenu" data-position-to="window" class="ui-content"> @RenderPage("~/Account/Login.cshtml") </div> </div> @RenderBody() </div>
Participant
1076 Points
320 Posts
MVP
Aug 02, 2013 08:03 AM|kashyapa|LINK
you have not pasted the Login.cshtml. So assuming you have a button with id=btnLogin, you can try the following:
$(document).ready(function(){ $("#btnLogin").click(function(){ $("#txtUserName").val("") $("#txtPassword").val("") }) })
you use val() to read and set the value.
Member
229 Points
662 Posts
Jquery Mobile 1.3/Web matrix
Mar 27, 2013 04:05 PM|ssvikramuk|LINK
Hello- I am using webmatrix c# razor for my web app with jquery 1.3 mobile. Jquery Popup works perfectly, but i need is whenever clicking on login button the text fields should be cleared and refresh it again.
Participant
1076 Points
320 Posts
MVP
Re: Jquery Mobile 1.3/Web matrix
Aug 02, 2013 08:03 AM|kashyapa|LINK
you have not pasted the Login.cshtml. So assuming you have a button with id=btnLogin, you can try the following:
you use val() to read and set the value.
http://about.me/kashyapa