Form Help |
Form Help |
BND10706 |
Mar 25 2010, 08:04 AM
Post
#1
|
Group: Members Posts: 1 Joined: 25-March 10 Member No.: 11,487 |
First off I want to say I am a moderate beginer at scripting and code, and I apreciate any help on this matter.
I hope this is the right forum, thanks in advance I am in the military and I am trying to make my life eaiser by transfering a form that we have in a pdf format to an html format to fill out so once its done I submit it to what we call a chat blank for a good format for e-mail. There is a specific format that it needs to be in and that is why I have it coming up in a new window with the results the way I want it. The problem I am having is with checkboxes and radio buttons. For now I have been using alot of drop down menus because I get errors with the radio and check boxes and it makes the form garbled. radio buttons come back undefined, and check boxes just display all the information weather it is checked or not. Below is the code I am using, and anyone who can help me it would be greatly apreciated <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en"> <head> <title>UOF Chat Blank</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <HEAD> <script LANGUAGE="JavaScript"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function CreateWindow() { msgWindow=window.open("","displayWindow",& quot;toolbar=no,width=350,height=400,directories=no,status=no,scrollbars=yes,res ize=no,menubar=no") } function create(form) { var start="go"; if (start=="go") { text = ("<B>LE Response Information </TITLE></B>"); text += ("<br><B>(1)DATE:</B>" +form.input1.value+ " <B>(2)TIME:</B>" +form.input2.value+ " <B>(3)LEDO:</B>" +form.input3.value+ ""); text += ("<br><B>(4)LEU:</B>" +form.input4.value+""); text += ("<br><B>(5)UNIT NAME:</B>" +form.input5.value+ " <B>(6)HULL NUMBER:</B>" +form.input6.value+""); text += ("<br><B>(7)LEU:</B>" +form.input7.value+""); text += ("<br><B>(8)TYPE:</B>" +form.input8.value+"" +form.input9.value+""); msgWindow=window.open("","displayWindow",& quot;toolbar=no,width=600,height=480,directories=no,status=no,scrollbars=yes,res ize=no,menubar=no") msgWindow.document.write(text) msgWindow.document.close() } } // End --> </SCRIPT> <!-- STEP TWO: Put this code into the BODY of your HTML document --> <BODY> <BLOCKQUOTE> <head><h2><B>LE Response Information</h2></B></head> <FORM> <TABLE BORDER = 3 CELLPADDING = 3> <TR><TD> Date: <INPUT TYPE="text" NAME="input1" SIZE=20><BR> <TR><TD> Time: <INPUT TYPE="text" NAME="input2" SIZE=20 ><BR> <TR><TD> LEDO: <INPUT TYPE="text" NAME="input3" SIZE=20 ><BR> <TR><TD> LEU: <SELECT NAME="input4"> <OPTION VALUE=" SPC/LE">SPC/LE <OPTION VALUE=" RB-S">RB-S <OPTION VALUE=" RB-M">RB-M <OPTION VALUE=" CB-OTH">CB-OTH <OPTION VALUE=" 87 WPC">87 WPC <OPTION VALUE=" 110 WPB">110 WPB <OPTION VALUE=" 179 WPC">179 WPC <OPTION VALUE=" 210 WMEC" SELECTED>210 WMEC <OPTION VALUE=" 270 WMEC">270 WMEC <OPTION VALUE=" 378 WHEC">378 WHEC </SELECT> <TR><TD> Unit Name: <INPUT TYPE="text" NAME="input5" VALUE="USCGC VENTUROUS" SIZE=20><BR> <TR><TD> Hull Number: <INPUT TYPE="text" NAME="input6" VALUE="625" SIZE=20><BR> <TR><TD> TACON: <Br> Sector<INPUT TYPE="radio" NAME="input7" VALUE="Sector"><BR> D7<INPUT TYPE="radio" NAME="input7" VALUE="D7"><BR> CTU<INPUT TYPE="radio" NAME="input7" VALUE="D7"><BR> </SELECT> <TR><TD> Type:<br> <INPUT TYPE=CHECKBOX NAME="input8" value="go fast" >Go Fast<BR> <INPUT TYPE=CHECKBOX NAME="input9" value="chug">Chug<BR> <TR><td colspan="3"> <INPUT TYPE="button" VALUE="Click for Chat Blank" ONCLICK="create(this.form)"> </table> |
stjepan |
Mar 28 2010, 05:23 PM
Post
#2
|
Serious Coder Group: Members Posts: 329 Joined: 15-October 06 From: zagreb, croatia Member No.: 445 |
Well. validator shows many errors here. But, for the start, your script is neither in HEAD nor in BODY, how's that?
|
Lo-Fi Version | Time is now: 26th April 2024 - 07:04 PM |