mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-09-01 16:53:54 +02:00
36 lines
1.1 KiB
HTML
36 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<script src="scripts/data.js" type="text/javascript"></script>
|
|
<script>
|
|
function update_file(filename) {
|
|
file=filename+'.json'
|
|
lnk_file.setAttribute('href',getFullDataPath(file));
|
|
lnk_file=document.getElementById('lnk_file');
|
|
getDataFromFile(file,onApplyData)
|
|
}
|
|
function onApplyData(data) {
|
|
lnk_doi=document.getElementById('lnk_doi');
|
|
lnk_doi.setAttribute('href',getDoiUrl(data));
|
|
}
|
|
</script>
|
|
<script>
|
|
window.onload=function() {
|
|
var inp = document.getElementById("inp_filename");
|
|
inp.addEventListener("keydown", function (e) {
|
|
if (e.keyCode === 13) { //checks whether the pressed key is "Enter"
|
|
update_file(inp.value);
|
|
}
|
|
}
|
|
);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<label>Write a data file name without extension<br/>
|
|
<input type="text" id='inp_filename'></input>
|
|
</label><br/>
|
|
<a target="_blank" id='lnk_doi'>Go to paper</a>
|
|
<a target="_blank" id='lnk_file'>Go to file</a>
|
|
</body>
|
|
</html> |