Skip to content

Instantly share code, notes, and snippets.

@jerry
Created November 13, 2008 20:23
Show Gist options
  • Save jerry/24603 to your computer and use it in GitHub Desktop.
Save jerry/24603 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>NanoGong Example</title>
<script language="JavaScript">
function submitVoice() {
// Find the applet object
var applet = document.getElementById("nanogong");
// Tell the applet to post the voice recording to the
// backend PHP code
var ret = applet.sendGongRequest(
"PostToForm", "knobson", "voicefile",
"", "temp");
if (ret == null || ret == "")
alert("Failed to submit the voice recording!");
else
alert(ret);
alert("Voice recording has been submitted!");
}
</script>
</head>
<body>
<p>Please submit your voice using the NanoGong applet below.</p>
<applet id="nanogong" archive="/applets/nanogong.jar"
code="gong.NanoGong" width="180" height="40"></applet>
<form>
<input type="button" value="Submit!"
onclick="submitVoice()" />
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment