<body>
<h1>DAC Control</h1>
<div class="dac_container">
- FPGA <input class="dac_input" type="text" id="fpga" onChange="loadvalues()"> <a id="DownloadLink" href="getdacfile.pl" download="CONF_dac.pl" target="_blank">Download</a>
+ FPGA <input class="dac_input" type="text" id="fpga" onChange="loadvalues()">
+ <a id="DownloadLink" href="getdacfile.pl" download="CONF_dac.pl" target="_blank">Download</a>
+ <input class="dac_input" type="text" id="filename" onChange="setfilename()" value="CONF_dac.pl">
<div class="slider_container"> <div class="slider_name">VCASP</div> <input class="dac_input" id="VCASP" type="range" min="0" max="255" step="1.0" value="67" onChange="send('VCASP')"><div class="slider_value" id="VCASPtxt"></div></div>
<div class="slider_container"> <div class="slider_name">VCASNA</div> <input class="dac_input" id="VCASA" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASA')"><div class="slider_value" id="VCASAtxt"></div></div>
<div class="slider_container"> <div class="slider_name">VCASNB</div> <input class="dac_input" id="VCASB" type="range" min="0" max="255" step="1.0" value="100" onChange="send('VCASB')"><div class="slider_value" id="VCASBtxt"></div></div>
document.getElementById("DownloadLink").href="getdacfile.pl?"+document.getElementById("fpga").value;
getData("getdac.pl?"+document.getElementById("fpga").value,"",showDacs);
}
+ function setfilename() {
+ document.getElementById("DownloadLink").download=document.getElementById("filename").value;
+ }
function showDacs(s) {
vals = s.split("-");