I am new to PHP and JavaScript.. I need to take the height of a div and assign it in to PHP variable so that I can use it later for further processes.
This is how tried it for now, but it did not workout well..
<div id="leftSideDataBox" style="height:auto; overflow:hidden">
// some web form contents
</div>
<?php $leftSideDataBoxHight=0;?>
<script>
var myDiv = document.getElementById("leftSideDataBox");
var boxHight=myDiv.clientHeight;
<?php $leftSideDataBoxHight?>=boxHight;
</script>
<?php if(leftSideDataBoxHight<100)
{
//do some window arrangements
}?>
I know it was not ROCKET SCIENCE, but i could not find any solution for it.
When I put a alert to it it displaces the height of the div
<script>
var myDiv = document.getElementById("leftSideDataBox");
alert(myDiv.clientHeight)
</script>
Do you guys have any solutions??? Thank You..