|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am having some trouble with a form I have.
I need to send formatted data to a CSV database on the web, but I m having trouble sending the formatted data to the CSV file. The file needs all the data formatted like such: AK=1, AJ=0, CD=1... etc. The database is set up with values in each field to include data with the included field being '1', and the excluded field in the database being '0'. I tried using this form sample but I need to mke it such that if I want to send VARIABLE data, that I need to send hidden data with DIFFERENT values. This is what I am using for now. It works but it is very ugly. i want it to be more streamlined. I would like it to work such that if I choose to VARY a component that I should just be able to click ONE radio button or CHECKBOX that will send a field of data and 2 fields of DIFFERENT values to the database. I want each 'checked' value to be able to send 3 hidden fields with 3 different values ...each with a different NAME= and each with a different VALUE= component. This is what I have... problem with this is that I have to click everything I want. I would like it to be less confusing. This form WORKS!... but I want to just push ONE radio button and have all the data attached to the radio button to pass, insted of having to clcik EACH radio button. (See addendum post) <form name="form2" method="post" action="mediachooser26.asp"> <table width="320" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="10" height="22" valign="top" scope="col"><span class="style7"></span></th> <th width="74" scope="col"><span class="style12"><span class="style13"><span class="style7"><span class="style14">Variable<br> <span class="style25">Yes No</span></span></span></span></span></th> <th width="79" scope="col"><span class="style7"><span class="style24">Standard</span><br> Yes No</span></th> <th width="10" scope="col"> </th> <th width="132" scope="col"> </th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="AK" type="radio" value="1" > <input name="AK" type="radio" value="0" checked> </span></th> <th scope="col"><span class="style18"> <input name="AJ" type="radio" value="1" checked> <input name="AJ" type="radio" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Salts</font></div></th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="AW" type="radio" value="1"> <input name="AW" type="radio" value="0" checked> </span></th> <th scope="col"><span class="style18"> <input name="AV" type="radio" value="1" checked> <input name="AV" type="radio" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Vitamins</font></div></th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="CD" type="radio" value="1"> <input name="CD" type="radio" value="0" checked> </span></th> <th scope="col"><span class="style18"> <input name="CC" type="radio" value="1" checked> <input name="CC" type="radio" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Trace Elements</font></div></th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="AD" type="radio" value="1"> <input name="AD" type="radio" value="0" checked> </span></th> <th scope="col"><span class="style18"> <input name="AC" type="radio" value="1" checked> <input name="AC" type="radio" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Sugars</font></div></th> </tr> <tr> <th height="30" scope="col"> </th> <th colspan="4" scope="col"> </th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"><span class="style18"> No <input name="F" type="radio" value="0"> </span></th> <th scope="col"> <span class="style7">Yes</span> <input name="F" type="radio" value="1" checked> </th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Nitrogen</font></div></th> </tr> <tr> <th height="19" colspan="5" scope="col"> </th> </tr> </table> <div align="center"> <p> <input name="submit" type="submit" class="style2" value=" Submit Change(s) "> <input name="reset" type="reset" value="Reset"> </p> </div> </form> This form can be found on this location: URL Last edited by PaulyWolly : October 10th, 2003 at 10:36 AM. |
|
#2
|
|||
|
|||
|
I tried this.. but it was sending all the hidden fields:
<form name="form2" method="get" action="mediachooser26.asp"> <table width="320" border="0" cellspacing="0" cellpadding="0"> <tr> <th width="10" height="22" valign="top" scope="col"><span class="style7"></span></th> <th width="74" scope="col"><span class="style12"><span class="style13"><span class="style7"><span class="style14">Variable</span></span></span></span></th> <th width="79" scope="col"><span class="style7"><span class="style24">Standard</span></span></th> <th width="10" scope="col"> </th> <th width="132" scope="col"> </th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="AK" type="hidden" value="1" > <input name="AJ" type="radio" value="0" > </span></th> <th scope="col"><span class="style18"> <input name="AJ" type="radio" value="1" checked> <input name="AK" type="hidden" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Salts</font></div></th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="AW" type="hidden" value="1"> <input name="AV" type="radio" value="0"> </span></th> <th scope="col"><span class="style18"> <input name="AV" type="radio" value="1" checked> <input name="AW" type="hidden" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Vitamins</font></div></th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="CD" type="hidden" value="1"> <input name="CC" type="radio" value="0"> </span></th> <th scope="col"><span class="style18"> <input name="CC" type="radio" value="1" checked> <input name="CD" type="hidden" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Trace Elements</font></div></th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"> <span class="style18"> <input name="AD" type="hidden" value="1"> <input name="AC" type="radio" value="0"> </span></th> <th scope="col"><span class="style18"> <input name="AC" type="radio" value="1" checked> <input name="AD" type="hidden" value="0"> </span></th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Sugars</font></div></th> </tr> <tr> <th height="30" scope="col"> </th> <th colspan="4" scope="col"> </th> </tr> <tr> <th height="21" scope="col"> </th> <th scope="col"><span class="style18"> No <input name="F" type="radio" value="0"> </span></th> <th scope="col"> <span class="style7">Yes</span> <input name="F" type="radio" value="1" checked> </th> <th scope="col"> </th> <th scope="col"><div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Nitrogen</font></div></th> </tr> <tr> <th height="19" colspan="5" scope="col"> </th> </tr> </table> <div align="center"> <p> <input type="submit" class="style2" value=" Submit Change(s) "> <input type="reset" value="Reset"> </p> </div> </form> ideally what I want is... to click what I want with one radio button and to have the hidden values to pass with it. The trouble is all the hidden values have different NAME= ttribute and VALUE= attribute. when I try to submit.. ALL HIDDEN VALUES are sent. I want only the hidden values sent with the radio buttons I pick. Last edited by PaulyWolly : October 10th, 2003 at 10:32 AM. |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Form trouble |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|