Created
August 9, 2017 21:49
-
-
Save birm/2f72ea527aa93392cd24590e78c5a06e to your computer and use it in GitHub Desktop.
A very simple site to generate state links for camicroscope
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
function genurl(){ | |
tid = document.getElementById("tid").value; | |
x = document.getElementById("x").value; | |
y = document.getElementById("x").value; | |
z = document.getElementById("z").value; | |
var l = encodeURIComponent(btoa(JSON.stringify({ | |
"x": x, | |
"y": y, | |
"z": z | |
}))); | |
url = "osdCamicroscope.php?tissueId="+tid+"&state="+l | |
document.getElementById("res").innerHTML = url; | |
} | |
</script> | |
</head> | |
<body> | |
<form> | |
Tissue ID: <input id="tid"/><br/> | |
X position (0 to 1)<input id="x"/><br/> | |
Y position (0 to 1)<input id="y"/><br/> | |
Zoom Factor <input id="z"/><br/> | |
<input type="button" onclick="genurl()" value="Generate"></input> | |
</form> | |
<div id ="res"> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment