I try to use two checkboxs with a value = "on". The other one is for rember after submit a form. Every time i click on this checkbox, they will always send "on".
What i do wrong ? Here is my code
var rdt = {
updateScroll: function() {
alert('klick scroll:' + gbi('scrollit').value);
gbi('main').removeChild(gbi('icontent'));
var ifr = document.createElement('iframe');
ifr.id = 'icontent';
ifr.src = gbi('urlinput').value;
ifr.scrolling = (gbi('scrollit').value == 'on') ? 'yes' : 'no';
gbi('scroll_hid').value = (gbi('scrollit').value == 'on') ? 'on' : 'off';
gbi('main').appendChild(ifr);
rdt.resizeView();
}
}
function gbi(iD) {
return document.getElementById(iD);
}
<input type="checkbox" id="scrollit" onclick="rdt.updateScroll()" checked>
<input type="hidden" name="scroll" id="scroll_hid" value="<?php echo $scroll ?>">
The parameter $scroll can predifine over URL, but the result was the same if i use it or if i dont use it.
</div>