alittle, advance

Results 1 to 4 of 4

Thread: alittle, advance

  1. #1 Guest

    Default alittle, advance

    1)I have a form submitted.<BR>2)example of from input<BR>&#060;input type=text name=lname&#062;<BR>&#060;input type=hidden name=lname value=tblone&#062;<BR>This tells me what table it goes into.<BR>on the back end I put this into arrays and build a insert into table string.<BR>insert into tblone(lname)Values(luis)<BR>PROBLEM:<BR>when I do a radio button , since all radio buttons have same name<BR>I get the tblone (which is in hidden 3 times) and I need it once.<BR>HELP<BR>

  2. #2
    lagerBoy Guest

    Default RE: alittle, advance

    Name your text input fields with different names, such as:<BR><BR>&#060;input type="text" name=lName_vis&#062;<BR>&#060;input type="hidden" name=lName_hid&#062;

  3. #3 Guest

    Default RE: alittle, advance LAGERBOY

    I do have them named different, but RADIO buttons need to have the same name so the because you can only choose one at a time.

  4. #4
    EDG Guest

    Default RE: alittle, advance

    I think perhaps we&#039re going to need a little more of the code you&#039re working with - both the full form and the ASP you&#039re using to interpret the results - in order to help you out, Luis... it&#039s not really clear what you&#039re trying to do, and what problem you&#039re having.<BR><BR>The first thing that pops out at me is that both form fields you list have the same NAME attribute:<BR>----<BR><BR>&#060;input type="text" name="lname"&#062;<BR>&#060;input type="hidden" name="lname" value="tblone"&#062;<BR><BR>----<BR>...which will either give you a comma-delimited string of values ("luis","tblone") or the value of the last element with that name ("tblone"). (It might produce an error, though I&#039d be surprised if that happened.) Thus, part of your problem might simply be that you&#039ve got too many elements with the same name.<BR><BR>As far as radio buttons go, yes - all radio buttons within a set have the same name, and whichever is selected is the value that will return. (This goes for checkboxes, too, by the by; if a set of checkboxes has the same name, referring to that name - e.g., Request.Form("checkboxes") - will return a comma-delimited list of the values of the checked boxes.) Thus, if you have a set of three radio buttons:<BR>----<BR><BR>&#060;input type="radio" name="myRadio" value="One"&#062; First<BR>&#060;input type="radio" name="myRadio" value="Two"&#062; Second<BR>&#060;input type="radio" name="myRadio" value="Three"&#062; Third<BR><BR>----<BR>...and you selected the second of the three, when you submitted the form and called on Request.Form("myRadio"), it would return the value "Two".<BR><BR>However, I&#039m not sure this is going to help you; as I said, I&#039m not entirely clear on what the problem is!<BR><BR>-EDG

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts