@@ -103,8 +103,8 @@
// this form is invoked as a popup; the current values of the parent
// object are in the form field ID passed as the 'id' param
-var parent_id = window.parent.document.getElementById('<% $parent_id %>');
-var curr_values = JSON.parse(window.parent_id.value);
+var parent_input = window.parent.document.getElementById('<% $parent_id %>');
+var curr_values = JSON.parse(window.parent_input.value);
var form = document.forms['fcc_option_form'];
var media_types = <% encode_json($media_types) %>
var technology_labels = <% encode_json($technology_labels) %>
@@ -129,6 +129,9 @@ function save_changes() {
var form = document.forms['fcc_option_form'];
var data = {};
for (var i = 0; i < form.elements.length; i++) {
+ if (form.elements[i].type == 'submit')
+ continue;
+
// quick and dirty test for whether the element is displayed
if (form.elements[i].clientHeight > 0) {
if (form.elements[i].type == 'checkbox') {
@@ -140,7 +143,9 @@ function save_changes() {
}
}
}
- parent_id.value = JSON.stringify(data);
+ parent_input.value = JSON.stringify(data);
+ // update the display
+ parent.show_fcc_options();
parent.cClick(); //overlib
}
--
cgit v1.2.1