Advertisement

[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

09/22/2003 at 07:46PM PDT, ID: 20745837
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.6

live dhtml date problem

Asked by linque in Hypertext Markup Language (HTML)

Tags: dhtml, doctype, javascript

I can't figure out what changed in my site.  The live time/date no longer shows up.  I've checked and fixed the body tag, and recopied the script that runs this, which I found at dynamic dhtml here:  http://www.dynamicdrive.com/dynamicindex6/clock3.htm   that script is pasted in below.  I also put the body tag information in.

after this script, I've pasted the code from my dysfunctional page.  If anyone spots what's wrong, I'd greatly appreciate the help!

linque




<script>

/*
Live Date Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/


var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
+"</b></font></small>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}

</script>
<span id="clock"></span>





source code from my page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta name="keywords" content="snow removal, snow shovelling, snow, shovel, shovelled, snow shovel, plow, snow plowing, snow plowed, block group, group plan, commercial, commercial snow removal, driveway, snow shovel service, winter, driveway, shovel driveway, michigan, MI, Michigan, Detroit, Dearborn, Dearborn Heights, Personal Snow Removal, ice, remove, salt">
<meta name="description" content="Personal Snow Removal will plow your home or your neighborhood block. Don't worry about your driveway or subdivision street in the winter.  We will shovel your snow.">
<link href="../style.css" rel="stylesheet" type="text/css">

<!-- TemplateBeginEditable name="doctitle" -->
<title> Dreamweaver Template</title>
<!-- TemplateEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--







<!--






<!--





<!--




<!--



<!--


<!--

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link href="../style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.address {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 14px;
      font-weight: bold;
      color: #000066;
      margin-top: 5px;
      margin-right: 5px;
      margin-bottom: 5px;
      margin-left: 5px;
}
-->
</style>
<style type="text/css">
<!--
-->
</style>
</head>

<body background="../images/layout/bg_ltBlue.jpg" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../images/layout/leftnav/leftnav_r1_c1_f2.gif','../images/layout/leftnav/leftnav_r2_c1_f2.gif','../images/layout/leftnav/leftnav_r4_c1_f2.gif','../images/layout/leftnav/leftnav_r6_c1_f2.gif','../images/layout/leftnav/leftnav_r8_c1_f2.gif','../images/layout/leftnav/leftnav_r10_c1_f2.gif','../images/layout/leftnav/leftnav_r12_c1_f2.gif','../images/layout/leftnav/leftnav_r14_c1_f2.gif',');goforit();" >

<table border="0" cellpadding="0" cellspacing="0" width="760">
<!-- fwtable fwsrc="header_new.png" fwbase="header_new.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="1" -->
  <tr>
   <td><table border="0" cellpadding="0" cellspacing="0" width="760">
        <tr>
         <td><img name="header_new_r1_c1" src="../images/layout/header_new/header_new_r1_c1.gif" width="243" height="73" border="0" alt=""></td>
         <td><table border="0" cellpadding="0" cellspacing="0" width="517">
              <tr>
               <td><img name="topheader" src="../images/layout/header_new/topheader.gif" width="517" height="5" border="0" alt=""></td>
              </tr>
              <tr>
               <td><table border="0" cellpadding="0" cellspacing="0" width="517">
                    <tr>
                     <td><table border="0" cellpadding="0" cellspacing="0" width="468">
                          <tr>
                                    <td><img name="header_new_r2_c3" src="../images/layout/header_new/header_new_r2_c3.gif" width="468" height="60" border="0" alt="Personal Snow Removal"></td>
                          </tr>
                          <tr>
                           <td><img name="bottomheader" src="../images/layout/header_new/bottomheader.gif" width="468" height="8" border="0" alt=""></td>
                          </tr>
                        </table></td>
                     <td><img name="endheader" src="../images/layout/header_new/endheader.gif" width="49" height="68" border="0" alt=""></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr>
   <td><table border="0" cellpadding="0" cellspacing="0" width="760">
        <tr>
            <td><a href="mailto:info@personalsnowremoval.com"><img name="tabheader" src="../images/layout/header_new/tabheader.gif" width="173" height="40" border="0" alt="e-mail"></a></td>
         <td><img name="pageheader" src="../images/layout/header_new/pageheader.gif" width="429" height="40" border="0" alt=""></td>
            <td><img name="header_new_r4_c4" src="../images/layout/header_new/header_new_r4_c4.gif" width="158" height="40" border="0" alt="(248) 559-2618"></td>
        </tr>
      </table></td>
  </tr>
</table>

<table width="760" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="150"><img src="/images/layout/spacer.gif" width="150" height="5
      "></td>
    <td width="450" align="center" valign="top" class="address" >24525 Southfield
      Road, Suite 202 <br>
      Southfield, Michigan 48075 <br>
      248.559.2618 | Fax 248.559.2620 <br> <a href="mailto:info@personalsnowremoval.com">E-mail:
      info@personalsnowremoval.com</a> </td>
    <!-- TemplateBeginEditable name="weather" -->
    <td width="160" align="center"><a href="http://www.weatherforyou.com/cgi-bin/hw3/hw3.cgi?forecast=zandh&place=Detroit&state=mi&country=us&zipcode="><img src="http://www.weatherforyou.net/fcgi-bin/hw3/hw3.cgi?config=png&forecast=hourly&place=Detroit&state=mi&alt=hwismallhourly&hwvbg=transparent&hwvtc=navy" alt="Weather Right Now In Detroit" width="140" height="70" border="0"></a>
      <br>
      <br>
     
<script>

/*
Live Date Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/


var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")

function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
+"</b></font></small>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}

</script>
<span id="clock"></span>
    <!-- TemplateEndEditable --></tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td> </td>
  </tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0">
  <tr valign="top">
    <td width="147">
<table border="0" cellpadding="0" cellspacing="0" width="147">
<!-- fwtable fwsrc="leftnav.png" fwbase="leftnav.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="1" -->
  <tr>
   <td><a href="../index.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r1_c1','','../images/layout/leftnav/leftnav_r1_c1_f2.gif',1);"><img name="leftnav_r1_c1" src="../images/layout/leftnav/leftnav_r1_c1.gif" width="147" height="17" border="0" alt="Home"></a></td>
  </tr>
  <tr>
   <td><a href="../coverageareas.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r2_c1','','../images/layout/leftnav/leftnav_r2_c1_f2.gif',1);"><img name="leftnav_r2_c1" src="../images/layout/leftnav/leftnav_r2_c1.gif" width="147" height="17" border="0" alt="Coverage Areas"></a></td>
  </tr>
  <tr>
   <td><a href="../guidelines.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r4_c1','','../images/layout/leftnav/leftnav_r4_c1_f2.gif',1);"><img name="leftnav_r4_c1" src="../images/layout/leftnav/leftnav_r4_c1.gif" width="147" height="17" border="0" alt="Program Guidelines"></a></td>
  </tr>
  <tr>
   <td><a href="../cost.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r6_c1','','../images/layout/leftnav/leftnav_r6_c1_f2.gif',1);"><img name="leftnav_r6_c1" src="../images/layout/leftnav/leftnav_r6_c1.gif" width="147" height="17" border="0" alt="Cost For Services"></a></td>
  </tr>
  <tr>
   <td><a href="../register.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r8_c1','','../images/layout/leftnav/leftnav_r8_c1_f2.gif',1);"><img name="leftnav_r8_c1" src="../images/layout/leftnav/leftnav_r8_c1.gif" width="147" height="17" border="0" alt="Registering Online"></a></td>
  </tr>
  <tr>
   <td><a href="../announcements.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r10_c1','','../images/layout/leftnav/leftnav_r10_c1_f2.gif',1);"><img name="leftnav_r10_c1" src="../images/layout/leftnav/leftnav_r10_c1.gif" width="147" height="17" border="0" alt="Announcements"></a></td>
  </tr>
  <tr>
   <td><a href="../commercial.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r12_c1','','../images/layout/leftnav/leftnav_r12_c1_f2.gif',1);"><img name="leftnav_r12_c1" src="../images/layout/leftnav/leftnav_r12_c1.gif" width="147" height="17" border="0" alt="Announcements"></a></td>
  </tr>
  <tr>
   <td><a href="../contact.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('leftnav_r14_c1','','../images/layout/leftnav/leftnav_r14_c1_f2.gif',1);"><img name="leftnav_r14_c1" src="../images/layout/leftnav/leftnav_r14_c1.gif" width="147" height="18" border="0" alt="Contact Us"></a></td>
  </tr>
</table>
      &nbsp;<!-- TemplateBeginEditable name="LeftNav SideBar" -->
      <table width="147" border="0" cellpadding="4" cellspacing="0" class="leftnav">
        <tr>
          <td align="center"> <div align="center">The Internet Home of Convenience
              for Snowbound Homeowners</div></td>
        </tr>
      </table>
      <!-- TemplateEndEditable --></td>
    <!-- TemplateBeginEditable name="Body" -->
    <td width="455" class="body"> <table width="100%" border="0" cellspacing="0" cellpadding="10">
        <tr>
          <td valign="top"> <p>Have you ever thought that thousands of Metro-Detroiters
              pay utility companies hundreds of dollar each year to protect them
              just in case the furnace breaks down, the air conditioner stops
              working or the stove won&#8217;t light. </p>
            <p>There is something else to stay prepared for in Michigan. SNOW
              FALLS! Signing up for our program eliminates this back breaking
              work for you and the tendency to wait for the neighborhood kids
              to come when most of them are home playing video games if snow fall
              results in a day off from school.</p>
            <p>OUR TRACTORS WILL BE ON YOUR STREET: CLEANING SIDEWALKS, DRIVEWAYS
              AND WALKWAYS. Add $25.00 per house, per year and the street is cleaned
              too. Opt out of the sidewalk, driveway and walkway program, pay
              $55.00 for the public street only.</p>
            <p>All you have to do is phone Ms. Davis in our offices at 248.559.2618,
              Ext. 22 any day but Thursday or click on the link &#8220;REGISTERING
              ON-LINE&#8221; and pay $139.95 for the season. After this winter
              season, beginning April 1st, 2004 you can begin paying a monthly
              rate of $15.00 and be covered for life and never clean snow again
              from December 1st through March 31st each season.</p>
            <p>We&#8217;re equipped with 15 snow tractors with 46&#8221; snow
              throwers to handle your private property. However, our limit is
              900 homes or 23 blocks, so the time to get on our list is now.<br>
            </p></td>
        </tr>
      </table></td>
    <td align="center"> <p class="address">Metro Detroit Weather</p>
      <p align="center"><img src="../images/layout/line_dashed.gif" width="140" height="2"></p>
      <p><a href="../register.htm"><img src="../images/layout/highlight_box.gif" alt="Register Now" width="140" height="130" border="0"></a></p>
      <p><img src="../images/layout/line_dashed.gif" width="140" height="2"></p>
      <p><img src="../images/layout/arrow.gif" width="10" height="10" hspace="3" align="absmiddle">
        A Project Of Detroit Maid &amp; Specialty Chore Services, Inc. and Personal
        Snow Removal, Inc.</p></td>
    <!-- TemplateEndEditable --><!-- TemplateBeginEditable name="Right Column Text" -->
    <!-- TemplateEndEditable --></tr>
  <tr valign="top">
    <td>&nbsp;</td>
    <td><table width="100%" border="0" cellpadding="3" cellspacing="0" class="fineprint">
        <tr>
          <td> <div align="center">Copyright &copy; 2003. PersonalSnowRemoval.com
              All Rights Reserved.<br>
              &nbsp; </div></td>
        </tr>
      </table></td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>View the Solution FREE for 7 Days
[+][-]09/22/03 07:56 PM, ID: 9410242

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/22/03 08:08 PM, ID: 9410276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/22/03 08:11 PM, ID: 9410287

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Hypertext Markup Language (HTML)
Tags: dhtml, doctype, javascript
Sign Up Now!
Solution Provided By: ketapillar
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09/22/03 09:17 PM, ID: 9410495

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/22/03 09:31 PM, ID: 9410537

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090617-EE-VQP-62