**** 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="JavaS cript"><!--
function generateForm()
{
//Input from FORM FIELDS//
info1 = this.document.f orms[0].myinfo.value;
info2 = this.document.f orms[0].myinfo2.value;
info3 = this.document.f orms[0].myinfo3.value;
info4 = this.document.f orms[0].myinfo4.value;
parent.self.doc ument.open();
parent.self.doc ument.writeln(" <CENTER>");
parent.self.doc ument.writeln(" <TABLE CELLSPACING=\"0 \"
CELLPADDING=\"0 \"BORDER=\"1 \" WIDTH=\"95%\">< TR><TD ALIGN=\"left\"> ");
//What to write//
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info1
<B>" + info1 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info2
<B>" + info2 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info3
<B>" + info3 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info4
<B>" + info4 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" </TD></TR></TABLE>");
parent.self.doc ument.writeln(" </CENTER>");
parent.self.doc ument.close();
}
//--></SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFF F">
<CENTER>
<TABLE CELLSPACING=10 CELLPADDING=0 BORDER=1 WIDTH=95%>
<TR><TD COLSPAN="2" ALIGN="center" BGCOLOR="#99FFC C"><FONT SIZE=+2
FACE="trebuchet ms">Info Template</FONT></TD></TR>
<TR>
<TD ALIGN="left">
<!--Form Input Fields--!>
<FORM NAME="myForm">
Input Info1 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo" SIZE="30"
VALUE="">
<BR>
Input Info2 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo2" SIZE="30"
VALUE="">
<BR>
Input Info3 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo3" SIZE="30"
VALUE="">
<BR>
Input Info4 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo4" SIZE="30"
VALUE="">
<BR>
<BR><INPUT TYPE="button" VALUE="Generate " onClick="genera teForm()">
</FORM>
</TD>
</FORM>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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="JavaS cript"><!--
function generateForm()
{
//Input from FORM FIELDS//
info1 = this.document.f orms[0].myinfo.value;
info2 = this.document.f orms[0].myinfo2.value;
info3 = this.document.f orms[0].myinfo3.value;
info4 = this.document.f orms[0].myinfo4.value;
parent.self.doc ument.open();
parent.self.doc ument.writeln(" <CENTER>");
parent.self.doc ument.writeln(" <TABLE CELLSPACING=\"0 \"
CELLPADDING=\"0 \"BORDER=\"1 \" WIDTH=\"95%\">< TR><TD ALIGN=\"left\"> ");
//What to write//
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info1
<B>" + info1 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info2
<B>" + info2 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info3
<B>" + info3 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" <FONT FACE=\"verdana, arial,helvetica l\">Info4
<B>" + info4 + "</B></FONT><BR>");
parent.self.doc ument.writeln(" </TD></TR></TABLE>");
parent.self.doc ument.writeln(" </CENTER>");
parent.self.doc ument.close();
}
//--></SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFF F">
<CENTER>
<TABLE CELLSPACING=10 CELLPADDING=0 BORDER=1 WIDTH=95%>
<TR><TD COLSPAN="2" ALIGN="center" BGCOLOR="#99FFC C"><FONT SIZE=+2
FACE="trebuchet ms">Info Template</FONT></TD></TR>
<TR>
<TD ALIGN="left">
<!--Form Input Fields--!>
<FORM NAME="myForm">
Input Info1 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo" SIZE="30"
VALUE="">
<BR>
Input Info2 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo2" SIZE="30"
VALUE="">
<BR>
Input Info3 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo3" SIZE="30"
VALUE="">
<BR>
Input Info4 Here: &nbs p;<INPUT TYPE="text" NAME="myinfo4" SIZE="30"
VALUE="">
<BR>
<BR><INPUT TYPE="button" VALUE="Generate " onClick="genera teForm()">
</FORM>
</TD>
</FORM>
</TR>
</TABLE>
</CENTER>
</BODY>
</HTML>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Comment