Skip to content

Instantly share code, notes, and snippets.

@edy555
Created December 15, 2012 17:05
Show Gist options
  • Select an option

  • Save edy555/4297214 to your computer and use it in GitHub Desktop.

Select an option

Save edy555/4297214 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Remote 2M NBFM RX</title>
<SCRIPT LANGUAGE=javascript>
var baseuri = "/cgi-bin/nbfm2wav.cgi?";
var audio = null;
function tune(freq) {
if (audio != null) {
audio.src = baseuri + freq;
audio.load();
audio.play();
}
}
function freqChanged() {
var freq = document.fmrx.frequency.value;
if (freq != null)
tune(freq);
}
function stop() {
if (audio != null)
audio.pause();
audio = null;
}
function start() {
var freq = document.fmrx.frequency.value;
try {
if (audio == null)
audio = new Audio("");
tune(freq);
} catch(e) {
audio = null;
}
}
</SCRIPT>
</head>
<body onLoad="freqChanged()">
<h1>Remote 2M NBFM RX</h1>
<FORM name="fmrx" onsubmit="return false;">
<P>Frequency: <INPUT name="frequency" VALUE="145.00M"
onChange="freqChanged();">
<INPUT TYPE="BUTTON" onClick="start();" VALUE="Start">
<INPUT TYPE="BUTTON" onClick="stop();" VALUE="Stop"></P>
</FORM>
</body> </html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment