bd*********@gmail.com said:
I'm getting the following error:
brian.style is null or not an object on the following code...can anyone
help?
<html>
<head>
<script>
<!--
function brianIt(){
brian.style.height = 12;
}
//--></script>
</head>
<body>This website is currently under construction.
<iframe id="brian" width="105" src="index.asp">iFrame it</iframe>
</body>
</html>
I don't believe you. That code should not show any error.
You're not even calling the function.
Please don't post make-believe code and ask for help with it.
You don't need the comments around the code. They're obsolete.
You can't refere to an object by it's id name, use the
getElementById() method:
<html>
<head>
<script>
function brianIt(){
document.getElementById("brian").style.height = 12;
}
</script>
</head>
<body onload="brianIt()">
This website is currently under construction.
<iframe id="brian" width="105" src="index.asp">iFrame it</iframe>
</body>
</html>