10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-25 13:53:48 +01:00
QUESTDB_website/index.html
2019-08-21 20:14:03 +02:00

33 lines
995 B
HTML

<!DOCTYPE html>
<html>
<head>
<script src="scripts/getdoiurl.js" type="text/javascript"></script>
<script>
function update_file() {
inp=document.getElementById('filename_inp');
doilink=document.getElementById('doilink');
doilink.setAttribute('href',getdoiurlfromfile(inp.value+'.json'));
filelink=document.getElementById('filelink');
filelink.setAttribute('href','datas/'+inp.value+'.json');
}
</script>
<script>
window.onload=function() {
var inp = document.getElementById("filename_inp");
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
<input type="text" id='filename_inp'></input>
</label>
<a target="_blank" id='doilink'>Go to paper</a>
<a target="_blank" id='filelink'>Go to file</a>
</body>
</html>