J
josh
Hi,
I'm doing a very simple task. After a page with Ajax is returning a
resultset I have two variables
containing true or false value to enable/disable first/last buttons
for a navigation bar.
but when I do:
var first = Boolean(nav[1]);
var last = Boolean(nav[2]);
document.getElementById("btn_f").disabled=first;
document.getElementById("btn_b").disabled=first;
document.getElementById("btn_n").disabled=last;
document.getElementById("btn_l").disabled=last;
all the buttons are disabled!
P.S.
If I put manually the value true or false the controls do the job!
P.S. 2
my tags are like this:
<button type="button" id="btn_f"><img src="../images/first.png"
width="16" height="16" /></button>
Thanks
I'm doing a very simple task. After a page with Ajax is returning a
resultset I have two variables
containing true or false value to enable/disable first/last buttons
for a navigation bar.
but when I do:
var first = Boolean(nav[1]);
var last = Boolean(nav[2]);
document.getElementById("btn_f").disabled=first;
document.getElementById("btn_b").disabled=first;
document.getElementById("btn_n").disabled=last;
document.getElementById("btn_l").disabled=last;
all the buttons are disabled!
P.S.
If I put manually the value true or false the controls do the job!
P.S. 2
my tags are like this:
<button type="button" id="btn_f"><img src="../images/first.png"
width="16" height="16" /></button>
Thanks