<commit_before>/*	
 *  Check the value of all the fields on the page, 
 *  if a value is changed launch an event that will check all the values again and update 
 *  the currently used rule for hiding and displaying fields.
 */

var inputs;

jQuery(document).ready(function($) {
	// Add a change handler to each input field
	inputs = $("[@name*='field']");
	inputs.change(function() {
		ajax();
	});
	ajax();
});

function ajax() {
	$.ajax({
		type: "GET",
		url: getTracURL(),
		data: getValues(),
		cache: false,
		dataType: 'xml',
		success: function(data) {
			showFields(data);
		}
	});
}

function getValues() {
	// Build the query string
	var values = "";
	inputs.each(function() {
		// The this.value property doesn't seem to work in IE for <select/> objects
		if ($.browser.msie) {
			var id = "field-" + this.name.substr(6);
			var fname = $("select#" + id + "").attr("name");

			if (this.name == fname) {<commit_msg>Refs #12 - Don't generate an internal server error when radio fields are in use.<commit_after>/*	
 *  Check the value of all the fields on the page, 
 *  if a value is changed launch an event that will check all the values again and update 
 *  the currently used rule for hiding and displaying fields.
 */

var inputs;

jQuery(document).ready(function($) {
	// Add a change handler to each input field
	inputs = $("[@name*='field']");
	inputs.change(function() {
		ajax();
	});
	ajax();
});

function ajax() {
	$.ajax({
		type: "GET",
		url: getTracURL(),
		data: getValues(),
		cache: false,
		dataType: 'xml',
		success: function(data) {
			showFields(data);
		}
	});
}

function getValues() {
	// Build the query string
	var values = "";
	inputs.each(function() {
		if ($(this).attr("type") == "radio" && !$(this).attr("checked")) {
			return;
		}
		// The this.value property doesn't seem to work in IE for <select/> objects
		if ($.browser.msie) {
			var id = "field-" + this.name.substr(6);
			var fname = $("select#" + id + "").attr("name");

			if (this.name == fname) {
{'fraction_non_alphanumeric': 0.16641753861484804, 'fraction_numerical': 0.001993024414549078, 'mean_word_length': 3.3938730853391683, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4811011', 'n_tokens_mistral': 712, 'n_tokens_neox': 654, 'n_words': 226}