Thanks guys, sadly I can only implement it if it's in javascript because it is for an assignment where the grades go towards the javascript you use for the website, so I can't use any other language like perl.