var dlgFavSave = $("<div></div>")
.html("My first basic jQuery modal dialog!")
.dialog({
buttons: {
"Yes": function() {
$(this).dialog("close");
},
"No": function() {
$(this).dialog("close");
}
},
autoOpen: false,
modal: true,
title: _dlgFavoriteTitle
});
$('#saveFave').click(function() {
dlgFavSave .dialog('open');
});
<div id="dialog-form" title="Save settings" >
<p>Please enter a name for your file</p>
<form>
<label for="name">File Name</label>
<input type="text" name="name" id="dlgname" class="text ui-widget-content ui-corner-all" />
</form>
</div>
$("#dialog-form").dialog({
buttons: {
"Yes": function() {
// just to see if we got the name I put an alert here
var fNameText = Fname.val();
alert(fNameText);
// here I would actually put the code to save the settings with this name
// then close
$(this).dialog("close");
},
"No": function() {
$(this).dialog("close");
}
},
autoOpen: false,
modal: true,
title: _dlgFavoriteTitle
});
$('#SaveFave').click(function() {
$("#dialog-form").dialog('open');
});
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE