locked
Jquery Mobile 1.3/Web matrix RRS feed

  • Question

  • User1519602350 posted

    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>

    Wednesday, March 27, 2013 4:05 PM

All replies

  • User-376018714 posted

    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.

    Friday, August 2, 2013 8:03 AM