Skip to content

Commit

Permalink
Merge pull request KamandPrompt#104 from vsvipul/add-back-button
Browse files Browse the repository at this point in the history
add back button to submit page
  • Loading branch information
aashish-ak authored Feb 21, 2019
2 parents a8f286e + b901d7b commit 35bdb80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/js/solution_submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ const submitSolution = () => {
});
});
}

const goBack = () => {
window.location.href = "/problem/" + question_id ;
}
1 change: 1 addition & 0 deletions views/solution_submit.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ int main(){
<% } %>
</select>
<button type="button" class="btn btn-primary btn-md" onclick="submitSolution();">Submit</button>
<button type="button" class="btn btn-primary btn-md" onclick="goBack()">Cancel</button>
</div>
</div>
<div id="running" style="display: none;">
Expand Down

0 comments on commit 35bdb80

Please sign in to comment.