chriscc17
10-14-2003, 09:15 PM
How can I add this mp3 file??
Here is the mp3 that plays with controls showing.
<embed src="/cgi-bin/fact1.MP3" autostart="false" hidden="false" loop="false">
How can I add this mp3 to play if messages[2] for example is selected from the script below.
something like:
if (messageindex==2) <embed src="/cgi-bin/fact1.MP3" autostart="false" hidden="true" loop="false">
That's all I want it to do. The written message is display in the text field and the mp3 file plays exacty what the message is so it can be heard.
Thanks,
Chris
<HTML>
<HEAD>
<TITLE>Demo</TITLE>
<center>
<font size="+3">
Demo
</font>
<p>
<p>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var messages = new Array(3);
messages[0] = "";
messages[1] = "I was born on February 23, 1981";
messages[2] = "I was born in Conyers, Georgia USA.";
function messageReveal() {
var messageindex = document.messageForm.messagePick.selectedIndex
document.messageForm.messageField.value = messages[messageindex];
}
// End -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#267CB0" TEXT="#000099" LINK="#FFCooo" ALINK="#FFcc99"
VLINK="#FFC000" marginwidth="0" leftmargin="0" topmargin="0" rightmargin="0">
<TABLE WIDTH="70%" BGCOLOR="#64AEE6" ALIGN="center" CELLSPACING="1" CELLPADDING="3" BORDER="1">
<TR>
<td align="left" colspan="2">
<form name="messageForm">
<select name="messagePick" OnChange="messageReveal()" style="font-family:'Arial';color:#000000;background-color:#FFFFF;font-size:9pt;>
<option value="0">Select a question from the drop down list.
<option value="1">Birthday?
<option value="2">Place of Birth?
</select>
</TD>
</TR>
<TR>
<td align="center">
<IMG src = "picture.jpg" width="159" height="188">
</TD>
<td align="center">
<textarea name="messageField" rows=6 cols=40 wrap=virtual input type="text">
</textarea>
</TD>
</TR>
</table>
</CENTER>
</BODY>
</HTML>
Here is the mp3 that plays with controls showing.
<embed src="/cgi-bin/fact1.MP3" autostart="false" hidden="false" loop="false">
How can I add this mp3 to play if messages[2] for example is selected from the script below.
something like:
if (messageindex==2) <embed src="/cgi-bin/fact1.MP3" autostart="false" hidden="true" loop="false">
That's all I want it to do. The written message is display in the text field and the mp3 file plays exacty what the message is so it can be heard.
Thanks,
Chris
<HTML>
<HEAD>
<TITLE>Demo</TITLE>
<center>
<font size="+3">
Demo
</font>
<p>
<p>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var messages = new Array(3);
messages[0] = "";
messages[1] = "I was born on February 23, 1981";
messages[2] = "I was born in Conyers, Georgia USA.";
function messageReveal() {
var messageindex = document.messageForm.messagePick.selectedIndex
document.messageForm.messageField.value = messages[messageindex];
}
// End -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#267CB0" TEXT="#000099" LINK="#FFCooo" ALINK="#FFcc99"
VLINK="#FFC000" marginwidth="0" leftmargin="0" topmargin="0" rightmargin="0">
<TABLE WIDTH="70%" BGCOLOR="#64AEE6" ALIGN="center" CELLSPACING="1" CELLPADDING="3" BORDER="1">
<TR>
<td align="left" colspan="2">
<form name="messageForm">
<select name="messagePick" OnChange="messageReveal()" style="font-family:'Arial';color:#000000;background-color:#FFFFF;font-size:9pt;>
<option value="0">Select a question from the drop down list.
<option value="1">Birthday?
<option value="2">Place of Birth?
</select>
</TD>
</TR>
<TR>
<td align="center">
<IMG src = "picture.jpg" width="159" height="188">
</TD>
<td align="center">
<textarea name="messageField" rows=6 cols=40 wrap=virtual input type="text">
</textarea>
</TD>
</TR>
</table>
</CENTER>
</BODY>
</HTML>