-1

I am creating a page where students log in their attendance for a class by putting in their SID and a key provided by the professor. Then it will go through the servlet and post that the student was there on a google spreadsheet (backend). My question is, after the SID is confirmed and everything how can i redirect them to a "Thank you for your Submission" page? We want them to get a confirmation page, so that they can have a receipt to show the professor that they were in class. We would like to later implement it where we can even send a email confirmation page to the student.

<body>
    <div id="title">
            <h2>CSC 131 Student Attendance</h2>
    </div>
    <div id="login">
        <form action ="QuickServlet" method="post">
            <h2>Student:</h2>
            <center><input type="text" id="key" placeholder="Enter Key:"/></center>
            <center><input type="text" id="Studentid" placeholder="Enter StudentID:"/></center>
            <center><input type="submit" id="mySubmit" value="Submit"/></center>
        </form>
    </div>
</body>
whw
  • 1
  • What language are you using on your web server? – Wayne Allen Jun 25 '17 at 23:02
  • i am using Javascript with Eclipse – whw Jun 25 '17 at 23:05
  • Javascript is a client-side language. Eclipse is a code editor. Wayne was asking what language you're using on your _server_. This is usually PHP, but could be anything (Python and Ruby are common alternatives). – Clonkex Jun 25 '17 at 23:48
  • I'm voting to close this question as off-topic because SO is here to help with code your wrote but SO is not here to write code for you. On top of that, your HTML is obsolete. – Rob Jun 26 '17 at 01:07

1 Answers1

0

In Javascript, you can use window.location.assign('confirmation-page-url'); to redirect to a new page.

Wayne Allen
  • 1,605
  • 1
  • 10
  • 16