Click to See Complete Forum and Search --> : JavaScript popup


Bulgarian
October 9th, 2011, 03:53 AM
Hello. I need to make popup in javascript like this: http://img525.imageshack.us/img525/3503/popupi.th.png (http://imageshack.us/photo/my-images/525/popupi.png/)
Need to 2 labels with ID and 1 dropdown menu. When select dropdown item and press save button change ID 2. The code must be something like this:
onEditProperties: function(args) {
var self = this;
var dlg = $('#dlgProperties');
var accountId = args.accountId;

if (accountId == undefined || accountId == null) {
$(document).trigger('ReconArtError', 'Select Account first.');
}

var buttons = {};
buttons[ButtonCancel] = function() { dlg.dialog('close'); };
buttons[ButtonSave] = function() {
var isValid = dlg.validate();
if (!isValid) return;

var saveParams = {};
saveParams['accountId'] = accountId;
saveParams['riskLevel'] = dlg.find('#riskLevel').val();

$.ajax({
url: '../Certification/SaveProperties',
type: 'POST',
dataType: 'json',
data: saveParams,
cache: false,
success: function(data) {
if (data.errorMsg) {
$(document).trigger('ReconArtError', data.errorMsg);
}
else {
self.accTabTree.root.reload();

}
},
error: self.onAjaxError
});
};

dlg.dialog({
bgiframe: true,
autoOpen: false,
modal: true,
title: Properties,
width: 600,
buttons: buttons,
close: function() {
$('input, textarea, select', dlg).val('');
$(this).dialog('destroy');
}
});

this.initEditPropertiesTemplate(args);

$.ajax({
url: '../tProperties',
type: 'GET',
dataType: 'json',
data: { accountId: accountId },
cache: false,
success: function(data) {
if (data.errorMsg) {
$(document).trigger('ReconArtError', data.errorMsg);
}

},
error: this.onAjaxError
});
},


Please help! :)