<html>
<head>
<script>
function showHide() {
document.body.offsetWidth;
document.getElementById('b').style.display = 'none';
document.getElementById('a').style.display = 'block';
document.body.offsetWidth;
}
</script>
</head>
<body>
<input type="radio" onclick="showHide()">
<br>
<div id="a" style="position:absolute; display:none"></div>
<div id="b" style="position:absolute"></div>
<script> showHide(); </script>
</body>
</html>