How do you get a form value??

Results 1 to 3 of 3

Thread: How do you get a form value??

  1. #1
    Join Date
    Dec 1969

    Default How do you get a form value??

    The problem I have is I have an 2 insert buttons for an insert form. Depending on which button they press it inserts the data and then goes to a specific page. This is the code I tried but im used to javascript to get stuff from forms.<BR><BR> If = "Submit" then<BR> MM_editRedirectUrl = "admin.asp"<BR> else MM_editRedirectUrl = "adminInfo.asp"<BR> end if<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default R&D Request.Form() (eop)


  3. #3
    Join Date
    Dec 1969

    Default RE: How do you get a form value??

    I not very clear on what you&#039;re trying to do, but I think I have an idea.<BR><BR>Depending on which button -insert button? haven&#039;t hear- the user clicked on, the use will be taken to the specific asp page.<BR><BR>If this is the case then try this<BR><BR>On your HTML code for the form don&#039;t include the method and action parameters so it looks like this &#060;form name="form1"&#062; also change your buttons from submit to just buttons &#060;input type="button" name="cmdAdmin" value="Submit" onclick="validateform(&#039;a&#039;)"&#062; and &#060;input type="button" name="cmdInfo" value="Submit" onclick="validateform(&#039;i&#039;)"&#062;<BR><BR >On your script code then<BR>&#060;script language="vbscript"&#062;<BR>&#039;this function takes one parameter<BR>Sub validateform(strGoTo)<BR>&#039;find where to take the user<BR>Select Case strGoto<BR> Case "i"<BR> MM_editRedirectUrl = "admin.asp"<BR> Case Else<BR> MM_editRedirectUrl = "adminInfo.asp"<BR>End Select<BR><BR>&#039;submit for to proper page<BR>form1.method = "post"<BR>form1.action = MM_editRedirectUrl<BR>form1.submit()<BR><BR>End Sub<BR>&#060;/script&#062;<BR><BR>Hope this helps

Posting Permissions

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