10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-27 21:27:44 +02:00
QUESTDB_website/index.html

33 lines
995 B
HTML
Raw Normal View History

2019-08-21 20:04:29 +02:00
<!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>