kristolcrawley
Programmer
I have a list displaying part information. On each line there's a checkbox. When the user clicks on the check box, which I named the index value for that line, I'm calling a function that will display a page with more detail about the part. It works great but whether you check or uncheck the box you still get the page. I tried testing for val.checked but that isn't working. What the heck am I doing wrong??
<TD><INPUT TYPE="checkbox" NAME="param:index" VALUE="moreInfo" onClick="showInfo(this.name);"></TD>
function showInfo (blah){
//var indVal = document.forms.value;
alert("this index is: " + blah);
var mainId = 0;
var subId = 0;
var windowwidth = 800, topheight = 600, bottomheight = 10; // default sizes
if (window.screen) {
windowwidth = window.screen.availWidth-10;
topheight = (window.screen.availHeight * 60 / 100) - 10;
bottomheight = (window.screen.availHeight * 40 / 100) - 20;
}
var UHJ = 'contractInfo.jhtml?mainId=' + mainId + '&subId=' + subId;
alert("clicky: " + blah.checked);
window.open(UHJ,'test','scrollbars=yes');
}
<TD><INPUT TYPE="checkbox" NAME="param:index" VALUE="moreInfo" onClick="showInfo(this.name);"></TD>
function showInfo (blah){
//var indVal = document.forms.value;
alert("this index is: " + blah);
var mainId = 0;
var subId = 0;
var windowwidth = 800, topheight = 600, bottomheight = 10; // default sizes
if (window.screen) {
windowwidth = window.screen.availWidth-10;
topheight = (window.screen.availHeight * 60 / 100) - 10;
bottomheight = (window.screen.availHeight * 40 / 100) - 20;
}
var UHJ = 'contractInfo.jhtml?mainId=' + mainId + '&subId=' + subId;
alert("clicky: " + blah.checked);
window.open(UHJ,'test','scrollbars=yes');
}