justin001
10-07-2003, 04:44 AM
function getFullPos(pObj,pAxis)
{
("true"=="true")?{if(pAxis=="y"){var prop="offsetHeight"};else{var prop="offsetWidth"}}:(alert("Bad"));
alert(prop);
for (var i=pObj;i.id!="myBody";i=i.offsetParent);
}
Apart from the inefficiently written condition, please can someone let me know what's wrong here?
Thanks,
Justin
{
("true"=="true")?{if(pAxis=="y"){var prop="offsetHeight"};else{var prop="offsetWidth"}}:(alert("Bad"));
alert(prop);
for (var i=pObj;i.id!="myBody";i=i.offsetParent);
}
Apart from the inefficiently written condition, please can someone let me know what's wrong here?
Thanks,
Justin