Javascript and cookies

account_circle Unassigned
schedule 5 Hours
account_balance_wallet $5

hi programmers!

I have this simple HTML form just for testing purposes.

<form id = "myform" onsubmit = "return checkcheckboxes()">

Box 1<input type = "checkbox" name = "chk1">

Box 2<input type = "checkbox" name = "chk2">

Box 3<input type = "checkbox" name = "chk3">

<input type = "submit" value = "Go to the next task">

<span id = "message">congratulations! you have completed all the tasks completely</span>


<script type = "text/javascript">

function checkcheckboxes() {

document.getElementById("message").innerHTML = "";

var valid = true;

var f = document.getElementById("myform");

if (f.chk1.checked == false) {valid = false}

if (f.chk2.checked == false) {valid = false}

if (f.chk3.checked == false) {valid = false}

if (!valid) {document.getElementById("message").innerHTML = "You must check all three boxes to proceed"};

return valid;



Now i wanna do 2 things

  • when a submit button is clicked, it sends the user to the next task(link)
  • i also wana trigger a cookie, so when they complete one task, the information is saved on the cookie, and when the user closes the window or get back to it later, task 2 will be showing up not task 1(every task has a different link)

Mar 18th, 2018
This can be easily achieved in Jquery? Do you want to use Jquery? I can answer this for $3
Jun 2nd, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
Mar 18th, 2018
Mar 18th, 2018
Mar 19th, 2018
Mark as Final Answer
Unmark as Final Answer
Final Answer

Secure Information

Content will be erased after question is completed.

Final Answer