locked
to show div inside the table cell using javascript RRS feed

  • Question

  • User229603173 posted

     I code will show/hide a div on the mouse over Field 2

    <script language="javascript">
        function mouseOver() {
            var oSource = window.event.srcElement;
           e = document.getElementById("z");
           e.style.visibility = "visible";
           y = parseInt(oSource.parentElement.offsetParent.cells[4].clientHeight/2)+25;
           x = (parseInt(oSource.parentElement.offsetParent.cells[0].offsetWidth) + parseInt(oSource.parentElement.offsetParent.cells[1].offsetWidth)) - 45
           e.style.left = x + 'px';
           e.style.top = y + 'px';
           var divht = ((parseInt(document.getElementById('Col2').clientHeight)/2)+10);
           e.style.height = divht + 'px';
        }
        function mouseaway() {
            e = document.getElementById("z");
            e.style.visibility = "hidden";
        }
    
    </script>
    Col1 Col2 col3
    Field1 Field2 Field3
    Tuesday, February 7, 2012 4:03 AM

All replies

  • User535082756 posted

    hi

    i think you can use the Jquery for this ...there is an option to Toggle on/off whererever reqd.

    just a thought..hope it helps,thanks,

    Tuesday, February 7, 2012 5:42 AM