how to Open new tab after click on submit button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spkonline
    New Member
    • Dec 2015
    • 1

    #1

    how to Open new tab after click on submit button

    How can i open this link in new tab after click on submit buton

    Code:
    <td
    <input name="submit_btn" class="btn btn-primary" id="btn3" value="Appointment Login" onclick="document.OnlineForm.action = 'ReprintAppt.jsp'" type="submit"> </div> </td>
    Last edited by Rabbit; Dec 21 '15, 06:12 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Luk3r
    Contributor
    • Jan 2014
    • 300

    #2
    You can accomplish this by using <form>..</form>.

    Code:
    <form action="http://www.yourSite.com/yourPage" method="get" target="_blank">
        <input type="submit" value="submit" />
    </form>

    Comment

    • Sherin
      New Member
      • Jan 2020
      • 77

      #3
      Code:
      <html>
      <body>
      
      <h1>click on submit button</h1>
      
      <form action="/action_page.php" method="get" target="_blank">
        <label for="fname">First name:</label>
        <input type="text" id="fname" name="fname"><br><br>
        <label for="lname">Last name:</label>
        <input type="text" id="lname" name="lname"><br><br>
        <input type="submit" value="Submit">
      </form>
      </body>
      </html>

      Comment

      Working...