Jump to content

problem with error in javascript


Ninjakreborn

Recommended Posts

[code]
function autodivheight (div1, div2) {
var divheight = document.div.getElementById('div1').style.height;
document.div.getElementById('div2').style.height = divheight;
//var divtochange = document.getElementById('div1').style.height;
//document.getElementById('div2').style.height = div1;
}
</script>
</head>
<body onload="autodivheight (leftnav, rightcontent);">[/code]
It's telling me expected object or something, unexpected object.
Am I referencing my div's wrong, those are the id names for the div's
I also tried with the .div.
Link to comment
https://forums.phpfreaks.com/topic/24989-problem-with-error-in-javascript/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.