Javascript & HTML Buttons

Results 1 to 2 of 2

Thread: Javascript & HTML Buttons

  1. #1
    Join Date
    Dec 1969

    Default Javascript & HTML Buttons

    If you have 5 submit buttons in a form, how do you do it, so that the hidden value is the name of the button pressed e.g.<BR><BR>if (the_form.sitetype[0].checked) in javascript will say if that is checked, how do you have if the button is checked<BR><BR>if (the_form.button[0].selected?? do the buttons all have the same name / value like check boxes?

  2. #2
    Join Date
    Dec 1969

    Default Two ways out...

    Use 5 different submit buttons with different names<BR><BR>or<BR><BR>User 5 different buttons and a hidden field.<BR><BR><BR>SUBMIT BUTTONS<BR>----------------<BR>&#060;input type="submit" name="submit1" value="Submit 1"&#062;<BR><BR>[then in the asp page]<BR>If Request.Form("submit1.x") &#060;&#062; 0 Then<BR>&#039;Submit button 1 was pressed<BR>End If<BR><BR>JAVASCRIPT BUTTONS<BR>---------------------<BR>&#060;input type="button" name="submit1" value="Submit 1" onclick="; form.submit()"&#062;<BR><BR>[Then in your ASP]<BR>If Request.Form("WhichButton") = "submit1" Then<BR>&#039;Submit 1 was pressed<BR>End If<BR><BR><BR>Eniac

Posting Permissions

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