#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    NYC, NY
    Posts
    2
    Rep Power
    0

    Angry Div or Javascript Problem?


    What's wrong with this code? It worked perfectly on my computer till I uploaded it to my Webhost, and it won't load any of the DIV stuff. I had a few CS/IS majors at my school look at it and they can't see what's wrong do you know?

    Everything works up to this:


    <SCRIPT LANGUAGE="JavaScript">
    document.writeln('<STYLE TYPE="text/css">');
    document.writeln('<\!--');
    document.writeln('#scrollWindow {position:absolute; left:'+scrollLeft+'; top:'+(scrollTop-1)+'; width:'+scrollWidth+'; height:'+(scrollHeight)+'; clip:rect(0,'+scrollWidth+','+scrollHeight+',0);}');
    document.writeln('#scrollBorderTop {position:absolute; left:0; top:0; width:'+scrollWidth+'; height:'+scrollBorder+'; clip:rect(0,'+scrollWidth+','+scrollBorder+',0); background-color:'+scrollBorderColor+'; layer-background-color:'+scrollBorderColor+';}');
    document.writeln('#scrollBorderBottom {position:absolute; left:0; top:'+(scrollHeight-scrollBorder)+'; width:'+scrollWidth+'; height:'+scrollBorder+'; clip:rect(0,'+scrollWidth+','+scrollBorder+',0); background-color:'+scrollBorderColor+'; layer-background-color:'+scrollBorderColor+';}');
    document.writeln('#scrollBorderLeft {position:absolute; left:0; top:0; width:'+scrollBorder+'; height:'+scrollHeight+'; clip:rect(0,'+scrollBorder+','+scrollHeight+',0); background-color:'+scrollBorderColor+'; layer-background-color:'+scrollBorderColor+';}');
    document.writeln('#scrollBorderRight {position:absolute; left:'+(scrollWidth-scrollBorder)+'; top:0; width:'+scrollBorder+'; height:'+scrollHeight+'; clip:rect(0,'+scrollBorder+','+scrollHeight+',0); background-color:'+scrollBorderColor+'; layer-background-color:'+scrollBorderColor+';}');
    // both scrollTextWindow and scrollTextDiv are written from this page
    if (scrollTextBGColor=="none")
    document.writeln('#scrollTextWindow {position:absolute; left:'+scrollBorder+'; top:'+scrollBorder+'; width:'+(scrollWidth-scrollBarWidth-2*scrollBorder)+'; height:'+(scrollHeight-2*scrollBorder)+'; clip:rect(0,'+(scrollWidth-scrollBarWidth-2*scrollBorder)+','+(scrollHeight-2*scrollBorder)+',0);}');
    else
    document.writeln('#scrollTextWindow {position:absolute; left:'+scrollBorder+'; top:'+scrollBorder+'; width:'+(scrollWidth-scrollBarWidth-2*scrollBorder)+'; height:'+(scrollHeight-2*scrollBorder)+'; clip:rect(0,'+(scrollWidth-scrollBarWidth-2*scrollBorder)+','+(scrollHeight-2*scrollBorder)+',0); background-color:'+scrollTextBGColor+'; layer-background-color:'+scrollTextBGColor+';}');

    document.writeln('#scrollTextDiv {position:absolute; left:'+scrollMarginLeft+'; top:'+scrollMarginTop+'; width:'+(scrollWidth-scrollBarWidth-2*scrollBorder-scrollMarginLeft-scrollMarginRight)+';}');
    document.writeln('#scrollBar {position:absolute; left:'+(scrollWidth-scrollBarWidth-scrollBorder)+'; top:'+scrollBorder+'; width:'+scrollBarWidth+'; height:'+(scrollHeight-2*scrollBorder)+'; clip:rect(0,'+scrollBarWidth+','+(scrollHeight-2*scrollBorder)+',0); background-color:'+scrollBarColor+'; layer-background-color:'+scrollBarColor+';}');

    if (scrollBoxColor=="none")
    document.writeln('#scrollBoxDiv {position:absolute; left:0; top:0; width:'+scrollBarWidth+'; height:'+scrollBoxHeight+'; clip:rect(0,'+scrollBarWidth+','+scrollBoxHeight+',0);}');
    else
    document.writeln('#scrollBoxDiv {position:absolute; left:0; top:'+scrollArrowHeight+'; width:'+scrollBarWidth+'; height:'+scrollBoxHeight+'; clip:rect(0,'+scrollBarWidth+','+scrollBoxHeight+',0); background-color:'+scrollBoxColor+'; layer-background-color:'+scrollBoxColor+';}');

    document.writeln('#scrollArrowUpDiv {position:absolute; left:0; top:0; width:'+scrollBarWidth+'; height:'+scrollArrowHeight+'; clip:rect(0,'+scrollBarWidth+','+scrollArrowHeight+',0); background-color:'+scrollArrowColor+'; layer-background-color:'+scrollArrowColor+';}');
    document.writeln('#scrollArrowDownDiv {position:absolute; left:0; top:'+(scrollHeight-2*scrollBorder-scrollArrowHeight)+'; width:'+scrollBarWidth+'; height:'+scrollArrowHeight+'; clip:rect(0,'+scrollBarWidth+','+scrollArrowHeight+',0); background-color:'+scrollArrowColor+'; layer-background-color:'+scrollArrowColor+';}');
    document.writeln('-->');
    document.writeln('</STYLE>');

    </SCRIPT>
    </div
    <DIV ID="scrollWindow">
    <DIV ID="scrollBar"><IMG SRC="fond_scroll.gif" WIDTH=14 HEIGHT=216 BORDER=0>
    <DIV ID="scrollBoxDiv"><IMG SRC="slider.gif" WIDTH=14 HEIGHT=24 BORDER=0></DIV>
    <DIV ID="scrollArrowUpDiv"><IMG SRC="fleche_up.gif" WIDTH=14 HEIGHT=14></DIV>
    <DIV ID="scrollArrowDownDiv"><IMG SRC="fleche_down.gif" WIDTH=14 HEIGHT=14></DIV>
    </DIV>
    <DIV ID="scrollBorderTop"></DIV>
    <DIV ID="scrollBorderBottom"></DIV>
    <DIV ID="scrollBorderLeft"></DIV>
    <DIV ID="scrollBorderRight"></DIV>
    <DIV ID="scrollTextWindow">
    <DIV ID="scrollTextDiv">
    <tr>
    </tr><br><br>
    <span class="newsDate"><br><br>
    </span><br><br>
    <span class="newsTitre">Ricky</span><br>
    <span class="newsPost">Vocals</span><br>
    <span class="newsDate"> More to come soon</span>

    <br><br>
    <span class="newsTitre">John</span><br>
    <span class="newsPost">Guitar</span><br>
    <span class="newsDate"> More To Come Soon</span>
    <br><br>
    <span class="newsTitre">Ralph</span><br>
    <span class="newsPost">Drums</span><br>
    <span class="newsDate"> More To Come Soon</span>

    </DIV>
    </DIV>
    </DIV>
    </body>


    </html>
    <SCRIPT LANGUAGE="JAVASCRIPT">
    </SCRIPT>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12
    well... one thing to make sure of is that the code hasn't been broken in anyspot of importance.
    Your editor may have broken your script, or youmay have hit enter at the wrong place.
    Try putting the statements on one line... if you have a syntax highlighter in your editor this will be much easier.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    NYC, NY
    Posts
    2
    Rep Power
    0

    Angry still not working


    still not working... tried what you said and it didn't work.

    the page in question is

    http://www.wholeinoneband.com/ybios.html

    it's one of many pages on the band I work for's website. and i can't figure out how to get this page to work, even though it worked fine when tested on my computer.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    173
    Rep Power
    12
    well right away after viewing both your site and compiling the code.. I got an error that scrollLeft is undefined...?
    Fix that and see if it helps..

IMN logo majestic logo threadwatch logo seochat tools logo