I have a modal form that opens a reset password for the user.
<div id="password-form" title="Reset Password"> <form method="post"> <fieldset> <label for="emailreset">Enter Email Address</label> <input type="text" name="emailreset" id="emailreset" class="text ui-widget-content ui-corner-all" /> </fieldset> </form> </div>
When the user clicks the reset password button, I call a function that checks if the user exists. after the success of the message, I change the contents of the div to the generated message. it all works as expected. Now what I want is to close the modal dialog once, I want the contents of reset to return to the form. I have problems with this. I tried different things, but his help in the work would not be appreciated.
this is what i have for jquery
$( "#password-form" ).dialog({ autoOpen: false, height: 200, width: 300, modal: true, buttons: { "Reset Password": function() { $.ajax({ url: "/model/websitemanager.cfc" , type: "post" , dataType: "html" , data: { method: "resetpassword" , emailreset: $("#emailreset").val() } , success: function (data){
Thanks in advance!
Jay
source share