[eluser]nOsCiRe[/eluser]
// My JavaScript using jquery
$(function()
{
$( "#dialog-form" ).dialog(
{
autoOpen: false,
resizable: false,
height: 270,
width: 350,
modal: true,
buttons:
{
"Click to Save": function()
{
// please help me on how to script on this area with validation of change password and save to database
$( this ).dialog( "close" );
},
Cancel: function()
{
$( this ).dialog( "close" );
}
},
close: function()
{
allFields.val( "" ).removeClass( "ui-state-error" );
}
});
$( "#changepassword" )
.button()
.click(function()
{
$( "#dialog-form" ).dialog( "open" );
});
});
My View Script
<div id='dialog-form' title='Change Password'>
<p>class='validateTips'>All form fields are required.</p>
<fieldset>
<label for='NewPassword'>New Password</label>
<input type='password' name = 'npassword1' id = 'npassword' value='' class='text ui-widget-content ui-corner-all' />
<label for='Confirmpassword'>Confirm Password</label>
<input type='password' name = 'cpassword'id='cpassword' value='' class='text ui-widget-content ui-corner-all' />
</fieldset>
<input class = 'changepassword' type = 'button' id ='changepassword' value = 'Reset Password'/>