www.webdeveloper.com
Results 1 to 4 of 4

Thread: Scrollertext does not function

  1. #1
    Join Date
    Aug 2005
    Posts
    59

    Question Scrollertext does not function

    Hi,

    I have the following script to create a scrollertext on my home page which has functioned previously but not know. What can be the reason?



    var osd = " "
    osd +="WELCOME !!! to ";
    osd +="Bäck, Storegården and its people during 350 years";
    osd +="";
    osd +="";
    osd +=" ";
    var timer;
    var msg = "";
    function scrollMaster () {
    msg = customDateSpring(new Date())
    clearTimeout(timer)
    msg += " " + showtime() + " " + osd
    for (var i= 0; i < 100; i++){
    msg = " " + msg;
    }
    scrollMe()
    }
    function scrollMe(){
    window.status = msg;
    msg = msg.substring(1, msg.length) + msg.substring(0,1);
    timer = setTimeout("scrollMe()", 200);
    }
    function showtime (){
    var now = new Date();
    var hours= now.getHours();
    var minutes= now.getMinutes();
    var seconds= now.getSeconds();
    var months= now.getMonth();
    var dates= now.getDate();
    var years= now.getYear();
    var timeValue = ""
    timeValue += ((months >9) ? "" : " ")
    timeValue += ((dates >9) ? "" : " ")
    timeValue = ( months +1)
    timeValue +="/"+ dates
    timeValue +="/"+ years
    var ap="A.M."
    if (hours == 12) {
    ap = "P.M."
    }
    if (hours == 0) {
    hours = 12
    }
    if(hours >= 13){
    hours -= 12;
    ap="P.M."
    }
    var timeValue2 = " " + hours
    timeValue2 += ((minutes < 10) ? ":0":":") + minutes + " " + ap
    return timeValue2;
    }
    function MakeArray(n) {
    this.length = n
    return this
    }
    monthNames = new MakeArray(12)
    monthNames[1] = "January"
    monthNames[2] = "February"
    monthNames[3] = "March"
    monthNames[4] = "April"
    monthNames[5] = "May"
    monthNames[6] = "June"
    monthNames[7] = "July"
    monthNames[8] = "August"
    monthNames[9] = "September"
    monthNames[10] = "October"
    monthNames[11] = "November"
    monthNames[12] = "December"
    daysNames = new MakeArray(7)
    daysNames[1] = "Sunday"
    daysNames[2] = "Monday"
    daysNames[3] = "Tuesday"
    daysNames[4] = "Wednesday"
    daysNames[5] = "Thursday"
    daysNames[6] = "Friday"
    daysNames[7] = "Saturday"
    function customDateSpring(oneDate) {
    var theDay = daysNames[oneDate.getDay() +1]
    var theDate =oneDate.getDate()
    var theMonth = monthNames[oneDate.getMonth() +1]
    var dayth="th"
    if ((theDate == 1) || (theDate == 21) || (theDate == 31)) {
    dayth="st";
    }
    if ((theDate == 2) || (theDate ==22)) {
    dayth="nd";
    }
    if ((theDate== 3) || (theDate == 23)) {
    dayth="rd";
    }
    return theDay + ", " + theMonth + " " + theDate + dayth + ","
    }
    scrollMaster();

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,656
    you missed the [code][/code] tags

  3. #3
    Join Date
    Aug 2005
    Posts
    59
    Hi,

    I am afraid I cannot follow what you mean.

    In my starting or index file, I ask for the "scrollertext.js" as you can see from the following code. The program has functioned previously so it is a mystery why it is not functioning now.



    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta http-equiv="Content-Language" content="en-us">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>B&auml;ck, Storeg&aring;rden and its people during 350 years</title>
    <link href="style.css" rel="stylesheet" type="text/css">
    <script src="scrollertext.js"></script>
    <script src="visitorcounter.js"></script>
    <script src="todaydate.js"></script>
    <script src="bokmarke.js"></script>
    <script src="pop_up_window.js"></script>
    <script src="cookie.js"></script>


    </head>
    <body leftmargin='15' topmargin='15' marginleft='15' marginleft='15' bgcolor='#ffffff'>
    <HR WIDTH="100%">

    <div style="padding:30;">


    </div>


    <table>

    <td><div style="padding:30;height:90%;">

    <a name="chapter_0"></a>
    <div>
    <center>
    <table border="0" cellpadding="2" class="center" width="908" height="574" >
    <tr>
    <td align="right" valign="top" width="175" height="105">&nbsp;</td>
    <td width="1" height="105"></td>
    <td valign="baseline" width="670" height="105"><font size="3">
    <img src="bilder/storegarden_merge6.jpg" width="450" height="102" ></font>
    </tr>
    <tr>
    <td align="right" valign="top" width="175" height="21" ></td>
    <td width="1" height="21" valign="top"></td>
    <td valign="top" width="670" align="left" class="head" height="21" ><font size="1"><em><strong>Old Storeg&aring;rden, B&auml;ck. Photo from 1962.&nbsp;
    <font size="1">Summarized by
    <A HREF="html/000/0000/036.htm">Jan Rennel</A>, Falun.<A HREF="mailto:info@rennel.com"> E-mail: info@rennel.com
    </strong></em></font></a>
    </td>
    </tr>
    <tr>
    <td valign="top" width="169" class="left" height="430" >
    <p class="left" ><font size="2"><strong>&nbsp;</strong></font>

    </div>


    <td width="1" height="430" ></td>
    <td valign="top" width="670" height="430" ><font size="3">
    <br>

    </font><br>
    <center>

    <img src="bilder/welcome3.gif" height="120" ><br>
    </center>
    <p>&nbsp;</p>
    <p>

    This genealogical chronicle has geographically its origin in the administrative
    province of V&auml;sterg&ouml;tland in Sweden. However, a look in the location
    register reveals how the family tree gradually has spread to many other
    places, not only in V&auml;sterg&ouml;tland. Even so, the geographical focus is
    very much on the village of B&auml;ck. That village is interesting because the shares of
    land were so extremely splitted. The result of the various land
    reforms in the beginning of 19th century was, therefore, more
    far-reaching than in many other places.&nbsp;

    <p>By clicking on one of the flags the reader will be taken to the
    English (not completely ready) or the Swedish version of the text. In spite of that, the
    reader will find a mixture of Swedish and English in the Swedish version
    and vice versa. Hopefully, the English version will be somewhat easier
    to read for an English speaking person than the Swedish one.

    <p >You should <b> allow active content </b> to run in files of your computer, <b>cookies</b>
    as well as <b>enable Pop-Up Blocker</b>, i.e. Pop-Up Blocker must be <b>Off</b>
    for the program to work properly, i.e. automatically bring you to the menu page.

    When you open <A HREF="http://www.rennel.com/genealogy/">www.rennel.com/genealogy/</A> you will
    come to the index.htm page, showing the
    rotating heading: "Welcome to B&auml;ck, Storeg&aring;rden and its people
    during 350 years" in green colour. However, if you have visited this index.htm page during the last 24 hours,
    you will instead be taken automatically to "chapter 1" with the big meny list to the left of the page or the corresponding english page.
    A prerequisite for this is, however, proper settings of your computer as indicated above.

    On the index.htm page you will also see how many times you have visited the page .

    <p>

    <font size="2">



    <!--<INPUT TYPE=IMAGE SRC='bilder/us_flag.jpg' height='30' align='left' /onClick="setCookie('myCookie','english',expDate,'../genealogi_internet_2007_07_08/genealogy/chapter_1e')">
    '<!--<INPUT TYPE=IMAGE SRC='bilder/swedish_flag.jpg' height='30' align='right' onClick="setCookie('myCookie','swedish',expDate,'../genealogi_internet_2007_07_08/genealogy/chapter_1')"> //-->


    <INPUT TYPE=IMAGE SRC='bilder/us_flag.jpg' height='30' align='left' /onClick="setCookie('myCookie','english',expDate,'../../genealogy/chapter_1e')">
    <INPUT TYPE=IMAGE SRC='bilder/swedish_flag.jpg' height='30' align='right' onClick="setCookie('myCookie','swedish',expDate,'../../genealogy/chapter_1')">

    <p>


    </b></strong></a></font>
    </font>
    </center>
    </table>
    <center>
    <center>
    <center>

    <HR WIDTH="100%">
    <font size="2"></center>
    <table border="0" width="100%">
    <tr>
    <td width="33%"><font size="2">Copyright © 2005</td>
    <td width="33%" align="center"><font size="2"><A HREF="mailto:info@rennel.com">E-mail: info@rennel.com</A></center></font></td>
    <td width="34%"><font size="2">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    Last updated September 1, 2008</td>
    </tr>
    <tr>
    <td width="33%" p align="left"><font size="2">
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin

    document.write("You have visited this page <b>" + amt() + "</b> time(s).")
    // End -->
    </SCRIPT> </td>
    </td>
    <td width="33%" p align="left"><font size="2">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <A HREF="http://www.rennel.com/genealogy/">www.rennel.com/genealogy/</A>
    <td width="33%"><Font size='2'>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <SCRIPT LANGUAGE="JAVASCRIPT">
    <!-- Talar om vilket datum det &auml;r

    document.writeln("Today,&nbsp; it is")
    document.write(m_names[curr_month] + "&nbsp;" + curr_date + "," + "&nbsp;" + curr_year);
    /* The last two lines above have to placed on a single line */

    //-->
    </SCRIPT>


    </td>
    </tr>
    <tr>
    <td width="33%"><font size="2"><a href="new_window.htm" onclick="popup();return false;">Browser information</A></td>
    <td width="33%" p align="left"><font size="2">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    <a href="#" onclick="laegg_till_bokmaerke(); return false;">Add to Favorites</a></td>
    </center>
    <td width="33%"><font size="2">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;
    Cookie:<nobr>
    <a href="#" onClick="dispCookie('myCookie')">Read</a>
    <a href="#" onClick="deleteCookie('myCookie')">Delete</a></td>
    </tr>
    </table>
    </BODY>

  4. #4
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,656
    1. read my signature and plz stop posting square miles of code without using the [code][/code] tags
    2. your scroller works ok. i removed all the other scripts from your code and there was text running in the bottom of the page. if you look at the error console you'll probably see some errors caused by another script (you have more that just the scrollertext.js linked)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles