Problems with JScript in ASP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oscarGon
    New Member
    • Oct 2006
    • 1

    Problems with JScript in ASP

    I have a div called 'myscroll' in one template *.dwt I use in other pages, with this sintax:

    <div id="myscroll">< table cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td><div id="up" style="position :relative; z-index:2; cursor:pointer; "><img src="/js/images/FlechaArriba.jp g" width="10" height="10" /></div></td></tr>
    <tr><td height=250 id="altura" valign=top><div id="drag" style="position :relative; z-index:4; cursor:pointer; "><img src="/js/images/track.gif" width="10" height="10" /></div>
    <div id="track" width=1 height=1 style="position :absolute; z-index:3;"></div></td></tr>
    <tr><td><div id="down" style="position :relative; z-index:5; cursor:pointer; "><img src="/js/images/FlechaAbajo.jpg " width="10" height="10" /></div></td>
    </tr>
    </table></div>

    In other pages who uses this template, i create a function like this in order to hide this div

    function scrollabn() { scroll=document .getElementByNa me('myscroll');
    scroll.style.vi sible=false;
    scroll.style.di splay="none";
    }

    When i load this page, the div is visible.

    Can anyone help me?

    thanks
  • scripto
    New Member
    • Oct 2006
    • 143

    #2
    on the page in the BODY section try this:

    <BODY onLoad="Scrolla bn();">

    this will run your function every time the page is loaded

    Comment

    Working...