/**
* @param method
*/
function upload_method(method) {
// Also updates input and select_convert
if (input === "input") {
document.getElementById('input').value === "not_selected";
}
if (select_convert === "select_convert") {
document.getElementById('select_convert').value === "not_selected";
}
if(method === "file") {
document.getElementById("text_upload").value = "";
document.getElementById("url_upload").value = "";
document.getElementById("text_upload_tr").style.display = 'none';
document.getElementById("url_upload_tr").style.display = 'none';
document.getElementById("file_upload_tr").style.display = '';
} else if (method === "url") {
document.getElementById("text_upload").value = "";
try {
handleClearFiles();
} catch (e){}
document.getElementById("url_upload").value = "Your URL here";
document.getElementById("url_upload").focus();
document.getElementById("text_upload_tr").style.display = 'none';
document.getElementById("url_upload_tr").style.display = '';
document.getElementById("file_upload_tr").style.display = 'none';
} else if (method === "text") {
document.getElementById("url_upload").value = "";
try {
handleClearFiles();
} catch (e){}
document.getElementById("text_upload").value = "Your Model here";
document.getElementById("text_upload").focus();
document.getElementById("text_upload_tr").style.display = '';
document.getElementById("url_upload_tr").style.display = 'none';
document.getElementById("file_upload_tr").style.display = 'none';
}
}
/**
*
*/
function getLanguages() {
let xmlDoc;
// Making an Ajax call to get the list of languages supported as input.
$.ajax({
// The URL for the request
url: "config/converters.xml",
// The data to send (will be converted to a query string)
data: {
},
// Set to false if the request should be sent synchronously.
async: false,
// Whether this is a POST or GET request
type: "GET",
// The type of data we expect back
dataType : "xml",
// Code to run if the request succeeds;
// the response is passed to the function
success: function(xml) {
console.log("All supported standards/formats have been loaded successful!" + xml);
xmlDoc = xml;
},
// Code to run if the request fails; the raw request and
// status codes are passed to the function
error: function(xhr, status, errorThrown) {
console.log("Error: " + errorThrown);
console.log("Status: " + status);
console.dir(xhr);
},
// Code to run regardless of success or failure
complete: function(xhr, status) {
console.log("Loading all supported standards/formats is completed!");
}
});
var listLanguages = xmlDoc.getElementsByTagName('listlanguages').item(0);
var rep = "