1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

What's wrong with this code

Discussion in 'Software Development' started by Viper, Jan 18, 2002.

Thread Status:
Not open for further replies.
  1. Viper

    Viper Thread Starter

    Joined:
    Nov 5, 1999
    Messages:
    366
    I'm slightly confused as to what is wrong with this code. It works fine, yet in Dreamweaver 4, the FORM tags are highlighted......meaning there is possibly a problem with them. I can't see what it is though.

    Code:
    <HTML>
    <HEAD>
    
    </HEAD>
    
    <BODY  BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#990000" TEXT="#000000">
    <font color="#3A3A3A" size="-1" face="Arial,Helvetica,Univers,Zurich BT"> 
    
        <script language="javascript" type="text/javascript">
    	function F1_CountDown() {
    		var gp		= new Date("Feb 26, 2002 13:50:00 GMT");
    		var countdown	= new Date();
    		var gap		= Math.floor((gp.getTime() - countdown.getTime()) / 1000);
    
    		secs 	= gap % 60;
    		gap 		= Math.floor(gap / 60);
    		mins 	= gap % 60;
    		gap		= Math.floor(gap / 60);
    		hours	= gap % 24;
    		gap		= Math.floor(gap / 24);
    		days		= gap;
    
    		document.forms['countdown'].elements['days'].value = (days ? days : 0);
    		document.forms['countdown'].elements['hours'].value = (hours < 10 ? "0"+hours : hours);
    		document.forms['countdown'].elements['mins'].value = (mins < 10 ? "0"+mins : mins);
    		document.forms['countdown'].elements['secs'].value = (secs < 10 ? "0"+secs : secs);
    
    	}
    	setInterval("F1_CountDown()",1000);
    </script>
        <br>
        </font>
              <tr> 
            <td colspan="3"> 
    <form name="countdown">
    				<font color="#3A3A3A" size="-1" face="Arial,Helvetica,Univers,Zurich BT"> 
              </font>
            
        <table cellspacing="0" cellpadding="1" border="0" width="577">
          <tr> 
                  <td style="font-family: verdana; color: #000000; font-size: 7.5pt; font-weight: bold;" valign="middle"> 
                    &nbsp;&nbsp;
                    <input style="background-color: #ffffff; color: #CC0000; font-family: verdana; font-size: 7.5pt; border-width: 0;" name="days" size="2">
                    &nbsp;days, 
                    <input style="background-color: #ffffff;  font-family: verdana; color: #CC0000; font-size: 7.5pt; border-width: 0;" name="hours" size="1">
                    &nbsp;hours, 
                    <input style="background-color: #ffffff;  font-family: verdana; color: #CC0000; font-size: 7.5pt; border-width: 0;" name="mins" size="1">
                    &nbsp;minutes & 
                    <input style="background-color: #ffffff;  font-family: verdana; color: #CC0000; font-size: 7.5pt; border-width: 0;" name="secs" size="1">
              &nbsp;seconds... until the launch of [url]www.amcnab.co.uk[/url] </td>
                </tr>
    				
    </form>
              </table>
            </td>
          </tr>
        
        
          </BODY>
    </HTML>
    
    
    grrr....i used the "code" tags yet it is displaying the html :confused:
     
  2. RandyG

    RandyG

    Joined:
    Jun 26, 2000
    Messages:
    7,762
  3. Viper

    Viper Thread Starter

    Joined:
    Nov 5, 1999
    Messages:
    366
    Managed to "solve" it. I had some tags in the wrong place that were causing errors. Removed the tags, or moved them to the correct place and now everything works fine with no errors :)

    Thanks anyway.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/65355

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice