ahhh!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • decibel

    ahhh!

    Is there any way to pass the value of a javascript variable to a DIV
    property value, e.g. <div style="position :absolute; top: 'gap'+px';> ... so
    basically i want the div top property to be the variable gap from my
    javascript. any ideas?

    decibel


  • Cycloneous Echevarria

    #2
    Re: ahhh!

    <script language = "javascript " type = "text/javascript">

    var gap = document.getEle mentById('theDI V').style;

    gap.top = '100px';

    // or

    gap.top = 100;

    </script>

    decibel wrote:
    [color=blue]
    > Is there any way to pass the value of a javascript variable to a DIV
    > property value, e.g. <div style="position :absolute; top: 'gap'+px';> ... so
    > basically i want the div top property to be the variable gap from my
    > javascript. any ideas?
    >
    > decibel
    >
    >[/color]

    Comment

    Working...