Index: admin/js/confirm-close.js
===================================================================
--- admin/js/confirm-close.js	(revision 3445)
+++ admin/js/confirm-close.js	(revision 3449)
@@ -2,5 +2,5 @@
 
 	if (arguments.length > 0) {
-		for (var i=0; i<arguments.length; i++) {
+		for (var i = 0; i < arguments.length; i++) {
 			this.forms_id.push(arguments[i]);
 		}
@@ -15,17 +15,22 @@
 
 	getCurrentForms: function() {
+		// Store current form's element's values
+
 		var formsInPage = this.getForms();
-		var f;
+		var f, e;
 		var This = this;
-		this.forms=new Array();
-		for (var i=0; i<formsInPage.length; i++) {
+		this.forms = new Array();
+		for (var i = 0; i < formsInPage.length; i++) {
 			f = formsInPage[i];
 			var tmpForm = new Array();
-			for (var j=0; j<f.elements.length; j++) {
-				tmpForm.push(this.getFormElementValue(f[j]));
+			for (var j = 0; j < f.elements.length; j++) {
+				e = this.getFormElementValue(f[j]);
+				if (e != undefined) {
+					tmpForm.push(e);
+				}
 			}
 			this.forms.push(tmpForm);
 
-			chainHandler(f,'onsubmit',function() {
+			chainHandler(f, 'onsubmit', function() {
 				This.formSubmit = true;
 			});
@@ -34,4 +39,7 @@
 
 	compareForms: function() {
+		// Compare current form's element's values to their original values
+		// Return false if any difference, else true
+
 		if (this.forms.length == 0) {
 			return true;
@@ -39,9 +47,16 @@
 
 		var formsInPage = this.getForms();
-		var f;
-		for (var i=0; i<formsInPage.length; i++) {
+		var f, e;
+		for (var i = 0; i < formsInPage.length; i++) {
 			f = formsInPage[i];
-			for (var j=0; j < Math.min(f.elements.length,this.forms[i].length); j++) {
-				if (this.forms[i][j] != this.getFormElementValue(f[j])) {
+			var tmpForm = new Array();
+			for (var j = 0; j < f.elements.length; j++) {
+				e = this.getFormElementValue(f[j]);
+				if (e != undefined) {
+					tmpForm.push(e);
+				}
+			}
+			for (var j = 0; j < this.forms[i].length; j++) {
+				if (this.forms[i][j] != tmpForm[j]) {
 					return false;
 				}
@@ -53,4 +68,6 @@
 
 	getForms: function() {
+		// Get current list of forms as HTMLCollection(s)
+
 		if (!document.getElementsByTagName || !document.getElementById) {
 			return new Array();
@@ -60,5 +77,5 @@
 			var res = new Array();
 			var f;
-			for (var i=0; i<this.forms_id.length; i++) {
+			for (var i = 0; i < this.forms_id.length; i++) {
 				f = document.getElementById(this.forms_id[i]);
 				if (f != undefined) {
@@ -75,16 +92,32 @@
 
 	getFormElementValue: function(e) {
-		if (e == undefined || e.classList.contains('meta-helper') || e.classList.contains('checkbox-helper')) {
-			return null;
+		// Return current value of an form element
+
+		if (e == undefined) {
+			// Unknown object
+			return undefined;
+		}
+		if (e.type != undefined && e.type == 'button') {
+			// Ignore button element
+			return undefined;
+		}
+		if (e.classList.contains('meta-helper') || e.classList.contains('checkbox-helper')) {
+			// Ignore some application helper element
+			return undefined;
 		}
 		if (e.type != undefined && e.type == 'radio') {
+			// Return actual radio button value if selected, else null
 			return this.getFormRadioValue(e);
 		} else if (e.type != undefined && e.type == 'checkbox') {
+			// Return actual checkbox button value if checked, else null
 			return this.getFormCheckValue(e);
-		} else if (e.type == 'password') {
+		} else if (e.type != undefined && e.type == 'password') {
+			// Ignore password element
 			return null;
 		} else if (e.value != undefined) {
+			// Return element value if not undefined
 			return e.value;
 		} else {
+			// Every other case, return null
 			return null;
 		}
@@ -99,5 +132,5 @@
 
 	getFormRadioValue: function(e) {
-		for (var i=0; i <e.length; i++) {
+		for (var i = 0; i < e.length; i++) {
 			if (e[i].checked) {
 				return e[i].value;
@@ -112,9 +145,9 @@
 var confirmClosePage = new confirmClose();
 
-chainHandler(window,'onload',function() {
+chainHandler(window, 'onload', function() {
 	confirmClosePage.getCurrentForms();
 });
 
-chainHandler(window,'onbeforeunload',function(event_) {
+chainHandler(window, 'onbeforeunload', function(event_) {
 	if (event_ == undefined && window.event) {
 		event_ = window.event;
Index: admin/js/meta-editor.js
===================================================================
--- admin/js/meta-editor.js	(revision 3447)
+++ admin/js/meta-editor.js	(revision 3449)
@@ -81,5 +81,5 @@
 			for (var i=0; i < meta.length; i++) {
 				li = $('<li>'+meta[i]+'</li>');
-				a_remove = $('<a href="#" type="button" class="metaRemove meta-helper"><img src="images/trash.png" alt="remove" /></a>');
+				a_remove = $('<button type="button" class="metaRemove meta-helper"><img src="images/trash.png" alt="remove" /></button>');
 				a_remove.get(0).caller = this;
 				a_remove.get(0).meta_id = meta[i];
@@ -109,5 +109,5 @@
 					var meta_id = $(this).text();
 					li = $('<li><a href="' + This.meta_url + $(this).attr('uri') + '">'+meta_id+'</a></li>');
-					a_remove = $('<a href="#" type="button" class="metaRemove meta-helper"><img src="images/trash.png" alt="remove" /></a>');
+					a_remove = $('<button type="button" class="metaRemove meta-helper"><img src="images/trash.png" alt="remove" /></button>');
 					a_remove.get(0).caller = This;
 					a_remove.get(0).meta_id = meta_id;
@@ -163,5 +163,5 @@
 
 				$(data).find('meta').each(function(i) {
-					meta_link = $('<a href="#" type="button" class="metaItem meta-helper">' + $(this).text() + '</a>');
+					meta_link = $('<button type="button" class="metaItem meta-helper">' + $(this).text() + '</button>');
 					meta_link.get(0).meta_id = $(this).text();
 					meta_link.click(function() {
@@ -178,5 +178,5 @@
 
 				if (list_type == 'more') {
-					var a_more = $('<a href="#" type="button" class="button metaGetMore meta-helper"></a>');
+					var a_more = $('<button type="button" class="button metaGetMore meta-helper"></button>');
 					a_more.append(This.text_all + String.fromCharCode(160)+String.fromCharCode(187));
 					a_more.click(function() {
@@ -193,5 +193,5 @@
 					target.append(pa);
 
-					var a = $('<a href="#" type="button" class="button metaGetList meta-helper">' + This.text_choose + '</a>');
+					var a = $('<button type="button" class="button metaGetList meta-helper">' + This.text_choose + '</button>');
 					a.click(function() {
 						$(this).parent().next().removeClass('hide');
