Reputation: 450
I have alert pop up window on dblclick of textbox. I have a text area inside pop up window, I want to store the value entered in popup window in temporary variable and close popup window. Is it possible to store the data temporary and also clear the data once popup window is closed by user. because for multiple textboxes have same alert window.
var opt = {
autoOpen: false,
modal: true,
width: 350,
height: 'auto',
title: 'Comments'
};
$(function () {
$("#Cmnts").dialog({
autoOpen: false
});
});
$(document).ready(function () {
var theDialog = $("#Cmnts").dialog(opt);
$("input[type='text']").on("dblclick", function () {
$('#Cmnts').dialog('open');
});
});
<div id="Cmnts" style="display:none;">
<textarea name="Cmnts" id="CmntsTxt" rows="5" cols="30"></textarea>
</div>
can anyone help me to solve this Thanks in advance..
Upvotes: 1
Views: 1450