Forum Moderators: open
I tried to do a search but couldn't think of a way to describe this. Any ideas?
if u still want to do it with href's
u can make so
var click='true';
function stopclick()
{ahref=document.getElementById('neededhref');
if (click) {newvar=function() {return true;};click=false;} else {
newvar=function () {return false;};click=true;}
ahref.onclick=newvar;
}
<input type='ckeckbox' onclick='stopclick()' />
<a id='neededhref' href='somesource' onclick="return false"/>
I hope it helps
good luck to you
Hmmm.. how would you make this work because: <input type='checkbox' onclick='submitIt.disabled=(submitIt.disabled=="true")?false:true' /> doesn't work. If you check the box the button still remains disabled and I suppose you need this button to go to 'some location'
<script language="Javascript">
function check_agree (form) {
if (form.agree.checked) {
form.submitButton.disabled = true;
form.submit();
}
else { alert('If you don\'t agree, we set you free.'); }
}
</script>