**** Post for FREE via your newsreader at post.usenet.com ****
HI,
I am working on a project where I need to input data to a (local) HTML page
using multiple form elements, such as text, radio, checkbox, and dropdown.
When the form Submit button is clicked, I then need the input data either
written to another location on the same page, or written to another page (a
different frame would be fine)
This is to be used as a template where someone can enter data, generate an
output, and then copy and paste that output into another application.
An example of what I am working on is below.
I can get exactly what I want using text input only, but passing the
variables from other elements is killing me.
Any help would be GREATLY appreciated.
<HTML>
<HEAD>
<SCRIPT language="JavaScript"><!--
function generateForm()
{
//Input from FORM FIELDS//
info1 = this.document.forms[0].myinfo.value;
info2 = this.document.forms[0].myinfo2.value;
info3 = this.document.forms[0].myinfo3.value;
info4 = this.document.forms[0].myinfo4.value;
parent.self.document.open();
parent.self.document.writeln("<CENTER>");
parent.self.document.writeln("<TABLE CELLSPACING=\"0\"
CELLPADDING=\"0\"BORDER=\"1\" WIDTH=\"95%\"><TR><TD ALIGN=\"left\">");
//What to write//
parent.self.document.writeln("<FONT FACE=\"verdana,arial,helvetical\">Info1
<B>" + info1 + "</B></FONT><BR>");
parent.self.document.writeln("<FONT FACE=\"verdana,arial,helvetical\">Info2
<B>" + info2 + "</B></FONT><BR>");
parent.self.document.writeln("<FONT FACE=\"verdana,arial,helvetical\">Info3
<B>" + info3 + "</B></FONT><BR>");
parent.self.document.writeln("<FONT FACE=\"verdana,arial,helvetical\">Info4
<B>" + info4 + "</B></FONT><BR>");
parent.self.document.writeln("</TD></TR></TABLE>");
parent.self.document.writeln("</CENTER>");
parent.self.document.close();
}
//--></SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<TABLE CELLSPACING=10 CELLPADDING=0 BORDER=1 WIDTH=95%>
<TR><TD COLSPAN="2" ALIGN="center" BGCOLOR="#99FFCC"><FONT SIZE=+2
FACE="trebuchet ms">Info Template</FONT></TD></TR>
<TR>
<TD ALIGN="left">
<!--Form Input Fields--!>
<FORM NAME="myForm">
Input Info1 Here: <INPUT TYPE="text" NAME="myinfo" SIZE="30"
VALUE="">
<BR>
Input Info2 Here: <INPUT TYPE="text" NAME="myinfo2" SIZE="30"
VALUE="">
<BR>
Input Info3 Here: <INPUT TYPE="text" NAME="myinfo3" SIZE="30"
VALUE="">
<BR>
Input Info4 Here: <INPUT TYPE="text" NAME="myinfo4" SIZE="30"
VALUE="">
<BR>
<BR><INPUT TYPE="button" VALUE="Generate" onClick="generateForm()">
</FORM>
</TD>
</FORM>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=