Created
November 13, 2008 20:23
-
-
Save jerry/24603 to your computer and use it in GitHub Desktop.
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> | |
<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