How to make submit button to redirect to a different page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lufffyy420
    New Member
    • Mar 2020
    • 1

    How to make submit button to redirect to a different page

    After creating a form i need my submit button to redirect me to a different html page that i have listed as "thanks.htm l"

    what am i missing

    Code:
    <input type="submit" name="submit" value="Submit" class="button"”action = "thanks.html"method=”POST”
      >
    Last edited by gits; Mar 30 '20, 02:06 PM. Reason: added code tags
  • Ishan Shah
    New Member
    • Jan 2020
    • 47

    #2
    As you say, you have extra "(double quotes) ending with class name which is underlined below code :

    Code:
    <input type="submit" name="submit" value="Submit" class="button"[B][U]”[/U][/B]action = "thanks.html"method=”POST”

    You can redirect to different Html page using onclick, like the following :

    Code:
    <input type="submit" name="submit" value="Submit" class="button" onClick = "location.href='thanks.html'" method=”POST”>
    Last edited by Ishan Shah; Apr 3 '20, 05:51 AM. Reason: Code format not applied. that's why

    Comment

    • lewish95
      New Member
      • Mar 2020
      • 33

      #3
      This can be done by using the html "form" element. So you can simply do it by

      <form action="login.p hp" method="post">
      <div class="form-group">
      <div class="checkbox col-sm-10 col-sm-offset-2">
      <button type="submit" name="submitf" value="register " class="btn_dark _grey">{transla te text='register' }</button>
      </div>
      </div>
      </form>

      Comment

      Working...