View Full Version : multiple entries in a text area form

05-19-2004, 05:01 PM

Iíve been trying to make this work for days, and nothing seems to be working, what I like to do! Is, be able to add text inside the description text area by clicking on the buttons, Iím able to do it for only the first click, but not able to add a second and a 3rd entry without overriding the previous one.
Example of typical entry in text area: Single, Cartwheel, Windmill.
Can someone help me?
Thank you.

<TITLE>Untitled Document</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<FORM NAME="SuzyForm"> <P><FONT FACE="Trebuchet MS"><B>Form:</B></FONT><INPUT TYPE=button VALUE=Single ONCLICK="this.form.PicDesc.value=this.value" NAME=Submit1 STYLE="font:8pt verdana">
<FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><INPUT TYPE=button VALUE=Cartwheel ONCLICK="this.form.PicDesc.value=this.value" NAME=Submit2 STYLE="font:8pt verdana"></FONT></FONT><FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><INPUT TYPE=button VALUE=Windmill ONCLICK="this.form.PicDesc.value=this.value" NAME=Submit3 STYLE="font:8pt verdana"></FONT></FONT></FONT></FONT><INPUT TYPE=button VALUE=Ruffled ONCLICK="this.form.PicDesc.value=this.value" NAME=Submit4 STYLE="font:8pt verdana">
<INPUT TYPE=button VALUE=Tufted ONCLICK="this.form.PicDesc.value=this.value" NAME=Submit5 STYLE="font:8pt verdana">
<FONT SIZE="2"><INPUT TYPE=button VALUE=Over-lapped ONCLICK="this.form.PicDesc.value=this.value" NAME=Submit6 STYLE="font:8pt verdana">&nbsp;<INPUT TYPE=button VALUE=Crested ONCLICK="this.form.Form.value=this.value" NAME=Submit7 STYLE="font:8pt verdana"><FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><FONT SIZE="2"><INPUT TYPE=button VALUE=Fringed ONCLICK="this.form.Form.value=this.value" NAME=Submit8 STYLE="font:8pt verdana"></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></FONT></P><P>&nbsp;</P><P><B><FONT FACE="Trebuchet MS">Description:<BR>
</FONT></B></P></FORM><P>&nbsp; </P>

05-19-2004, 05:28 PM

Here you go. I think your main problems where that your attributes were nor enclosed in double quotes and a couple of your buttons had an incorrect element reference...

... ONCLICK="this.form.Form.value=this.value" NAME=Submit8 STYLE="font:8pt verdana">

instead of...


I took the liberty of cleaning up all those EVIL font tags and simplifying your style elements to a couple page level rules. I also converted the format to XHTML (XHTML must have a valid doctype as well as all element names and attributes in lowercase...and closing tags for all elements.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
font: 12px Verdana, Arial, Helvetica, sans-serif;
margin: 20px 0 0 0;

<form name="SuzyForm" id="SuzyForm">
<input type="button" value="Single" onclick="this.form.PicDesc.value=this.value" name="Submit1" />
<input type="button" value="Cartwheel" onclick="this.form.PicDesc.value=this.value" name="Submit2" />
<input type="button" value="Windmill" onclick="this.form.PicDesc.value=this.value" name="Submit3" />
<input type="button" value="Ruffled" onclick="this.form.PicDesc.value=this.value" name="Submit4" />
<input type="button" value="Tufted" onclick="this.form.PicDesc.value=this.value" name="Submit5" />
<input type="button" value="Over-lapped" onclick="this.form.PicDesc.value=this.value" name="Submit6" />
<input type="button" value="Crested" onclick="this.form.PicDesc.value=this.value" name="Submit7" />
<input type="button" value="Fringed" onclick="this.form.PicDesc.value=this.value" name="Submit8" />
<label for="PicDesc">Description:</label>
<textarea name="PicDesc" id="PicDesc cols="30" rows="20" wrap="virtual"></textarea>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum