boatful
asked on
onclick send form contents to child window bodyonclick send form contents to child window body
My personalized fitness program generator form (so far) looks like this:
<FORM>
Client's Name<INPUT TYPE="TEXT" NAME="name" SIZE=35>
<P>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex1.gif'>
<BR>blah,blah (ex1)<HR>">EXERCISE 1<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex2.gif'>
<BR>blah,blah (ex2)<HR>">EXERCISE 2<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex3.gif'>
<BR>blah,blah (ex3)<HR>">EXERCISE 3<BR>
ETC,ETC...<P>
<INPUT TYPE="reset" NAME="Reset">
</FORM>
What I need is an onclick button (function) which opens a child window and writes the form field contents ('name' and 'exercise') into the BODY of the popped window. Please help!!My personalized fitness program generator form (so far) looks like this:
<FORM>
Client's Name<INPUT TYPE="TEXT" NAME="name" SIZE=35>
<P>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex1.gif'>
<BR>blah,blah (ex1)<HR>">EXERCISE 1<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex2.gif'>
<BR>blah,blah (ex2)<HR>">EXERCISE 2<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex3.gif'>
<BR>blah,blah (ex3)<HR>">EXERCISE 3<BR>
ETC,ETC...<P>
<INPUT TYPE="reset" NAME="Reset">
</FORM>
What I need is an onclick button (function) which opens a child window and writes the form field contents ('name' and 'exercise') into the BODY of the popped window. Please help!!
<FORM>
Client's Name<INPUT TYPE="TEXT" NAME="name" SIZE=35>
<P>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex1.gif'>
<BR>blah,blah (ex1)<HR>">EXERCISE 1<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex2.gif'>
<BR>blah,blah (ex2)<HR>">EXERCISE 2<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex3.gif'>
<BR>blah,blah (ex3)<HR>">EXERCISE 3<BR>
ETC,ETC...<P>
<INPUT TYPE="reset" NAME="Reset">
</FORM>
What I need is an onclick button (function) which opens a child window and writes the form field contents ('name' and 'exercise') into the BODY of the popped window. Please help!!My personalized fitness program generator form (so far) looks like this:
<FORM>
Client's Name<INPUT TYPE="TEXT" NAME="name" SIZE=35>
<P>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex1.gif'>
<BR>blah,blah (ex1)<HR>">EXERCISE 1<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex2.gif'>
<BR>blah,blah (ex2)<HR>">EXERCISE 2<BR>
<INPUT TYPE="CHECKBOX" NAME="exercise" VALUE="<IMG SRC='ex3.gif'>
<BR>blah,blah (ex3)<HR>">EXERCISE 3<BR>
ETC,ETC...<P>
<INPUT TYPE="reset" NAME="Reset">
</FORM>
What I need is an onclick button (function) which opens a child window and writes the form field contents ('name' and 'exercise') into the BODY of the popped window. Please help!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The only concern I have is the 50 or so "if,then" statements I will need........
I wonder, could we replace all the "if (document.form1.exercise1.
if (document.form1.i.checked)
window1.document.write(doc
where n is the number of exercises in the menu.
this would shorten the script considerably, I'd think.
Do you care to try??