Forum Moderators: open
function checkSize()
{
var newHeight = alertWindow.document.body.scrollHeight;
if(document.all)
if(document.all.item("alertWindow").scrollHeight > 0)
document.all.item("alertWindow").style.height = newHeight;
else
document.frames(alertWindow).height = newHeight;
}
Works in IE, but haven't tested it in other browsers and am not too sure the proper attributes to set, so that may need some tweaking.
You, then, have a technique for avoiding using javascript: confirms and vbscript: msgBoxes by just loading page validation, delete Continue/Cancels and the like into an iframe.
This, of course, helps get away from doing too many things client-side, which, I've found, you want to avoid if at all possible as Client-side always seem to scream "Please Hack Me" to many people who know what they're doing.