Simple Javascript Problem
Hello,
Before we start, I know almost nothing about javascript so I'm probably just making a simple error. :D
When I run either the mySuspend or myResume function onClick it works fine, but I need to be able to check to see what the stause is and do the opossite (if suspended, resume, if resumed, suspend). But when I run the check function on click nothing happens, what am I doing wrong? :)
I made with with almost pure experience from other languages, so it's probably somthing dumb. :)
Code:
<SCRIPT LANGUAGE=\"JavaScript\"><!--
var Suspended
Suspended = 'No';
function check() {
if (Suspended = 'Yes')
{
Suspended = 'No';
myResume()
}
else
{
Suspended = 'Yes';
mySuspend()
}
}
function mySuspend() {
document.form.hoursperday.disabled=true;
}
function myResume() {
document.form.hoursperday.disabled=false;
}
//--></SCRIPT>