I have a javascript script that edits the desired text using a form which is then submitted onto a cgi/perl script and shows the changed text. However, I can get the script to change the color and type of font but not the style (bold, underlined, italic) or size of the text.
Here is the form:
html>
<head>
<title>TRANSFER INFO</title>
<script LANGUAGE="JavaScript">
<!-- Begin
function preview(form) {
var e = document.FrontPage_Form1.t
ext_color.
selectedIn
dex;
var f = document.FrontPage_Form1.t
ext_type.s
electedInd
ex;
var g = document.FrontPage_Form1.t
ext_style.
selectedIn
dex;
var abc = document.FrontPage_Form1.t
he_message
.value;
var abe = document.FrontPage_Form1.t
ext_color.
options[e]
.value;
var abf = document.FrontPage_Form1.t
ext_type.o
ptions[f].
value;
var abg = document.FrontPage_Form1.t
ext_style.
options[g]
.value;
document.write("<html><hea
d><title><
/title></h
ead>");
document.write("<tr><td><c
enter><fon
t size='6', face='" + abf + "', color='" + abe + "'><" + abg + ">" + abc + "</" + abg + "></font></center><p><p>")
;
document.write("</td></tr>
</table><p
><p><P>");
document.write("</body></h
tml>");
}
//--></script>
</head>
<body>
<table>
<TR><TD>
<form NAME="FrontPage_Form1" METHOD="post">
<p><input TYPE="TEXT" NAME="the_message" SIZE="25"> Text</p>
<p><select NAME="text_color" size="1">
<option value="black">black</optio
n>
<option value="red">red</option>
<option value="blue">blue</option>
<option value="green">green</optio
n>
</select> Text Color </p>
<p><select NAME="text_type" size="1">
<option VALUE="arial">Arial</optio
n>
<option VALUE="Century Gothic">Century Gothic</option>
<option VALUE="hobo">Hobo</option>
<option VALUE="symbol">Greek</opti
on>
</select> Text Font </p>
<p><!--WEBBOT bot="Validation" B-Disallow-First-Item="TRU
E" --><select NAME="text_style" size="1">
<option VALUE="center">plain</opti
on>
<option VALUE="i">italic</option>
<option VALUE="u">underlined</opti
on>
</select> Font Style </p>
<p><!--WEBBOT bot="Validation" B-Disallow-First-Item="TRU
E" --><select NAME="D1" size="1">
<OPTION value="10">10</OPTION>
<option VALUE="12">12</option>
<option VALUE="14">14</option>
<option VALUE="16">16</option>
</select> Size </p>
<p><input TYPE="submit" onClick="preview(this.form
)" VALUE="Click to make card"></p>
</form>
</TD></TR>
</table>
</body>
</html>
Problem Part of CGI SCRIPT:
<P>
<CENTER>
<FORM METHOD="POST" ACTION="$PROGNAME">
<INPUT TYPE="HIDDEN" NAME="action_code" VALUE="SENDCARD">
<INPUT TYPE="HIDDEN" VALUE="$fields{'pic_select
'}" NAME="pic_select">
<INPUT TYPE="HIDDEN" VALUE="$fields{'the_messag
e'}" NAME="the_message">
<INPUT TYPE="HIDDEN" VALUE="$fields{'text_color
'}" NAME="text_color">
<INPUT TYPE="HIDDEN" VALUE="$fields{'text_type'
}" NAME="text_type">
<INPUT TYPE="HIDDEN" FACE="$fields{'text_style'
}" NAME="text_style">
<INPUT TYPE="HIDDEN" VALUE="$ENV{'HTTP_REFERER'
}" NAME="parent">
<INPUT TYPE="submit" VALUE="SEND">
</FORM>
</CENTER>
</FONT>
</TD>
</TR>
</TABLE>
__END_OF_PARAMS__
}
I am using <I> , <U>, and <B>, for the value on the text_style option which I think is the problem.