Click here to Skip to main content
15,898,373 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDigital clock Pin
kavinnagarajan11-Aug-09 23:23
kavinnagarajan11-Aug-09 23:23 
AnswerRe: Digital clock Pin
Sun Rays11-Aug-09 23:38
Sun Rays11-Aug-09 23:38 
AnswerRe: Digital clock Pin
Abhijit Jana11-Aug-09 23:43
professionalAbhijit Jana11-Aug-09 23:43 
GeneralDigital clock Pin
kavinnagarajan11-Aug-09 23:47
kavinnagarajan11-Aug-09 23:47 
GeneralRe: Digital clock Pin
Abhijit Jana11-Aug-09 23:56
professionalAbhijit Jana11-Aug-09 23:56 
GeneralRe: Digital clock Pin
Abhishek Sur12-Aug-09 0:32
professionalAbhishek Sur12-Aug-09 0:32 
GeneralDigital clock Pin
kavinnagarajan12-Aug-09 0:45
kavinnagarajan12-Aug-09 0:45 
GeneralRe: Digital clock Pin
Abhishek Sur12-Aug-09 1:55
professionalAbhishek Sur12-Aug-09 1:55 
Just a little modification required.Use the script below:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <script type="text/javascript">
    var clock;
 
    function stopClock(){
        clearTimeout(clock);
    }
 
    function yourClock(){
      var nd = new Date();
      var h, m;
      var s;
      var time = " ";
      h = nd.getHours();
      m = nd.getMinutes();
      s = nd.getSeconds();
      if (h <= 9) h = "0" + h;
      if (m <= 9) m = "0" + m;
      if (s <= 9) s = "0" + s;
      time += h + ":" + m + ":" + s;
      document.getElementById('yourclockbox').innerHTML = time;
      clock = setTimeout("yourClock()", 1000);
    }
    </script>
</head>
<body onload="yourClock()",  onunload="stopClock(); return true" >
    <form id="form1" runat="server">
    <div>
    <div style="background-color: #fff5ff" id="yourclockbox" ></div>
    </div>
    </form>
</body>
</html>


If you want to show the element inside a div use innerHTML rather than value. Label1 is also not declared.

Rose | [Rose] Rose | [Rose]

Abhishek Sur

My Latest Articles
Create CLR objects in SQL Server 2005
C# Uncommon Keywords
Read/Write Excel using OleDB

Don't forget to click "Good Answer" if you like to.

QuestionMasterpage Vs Content page Pin
kavinnagarajan11-Aug-09 23:09
kavinnagarajan11-Aug-09 23:09 
AnswerRe: Masterpage Vs Content page Pin
Abhijit Jana11-Aug-09 23:15
professionalAbhijit Jana11-Aug-09 23:15 
QuestionUsing Ajax Cascading dropdown with sql stored procedures Pin
Andile.M11-Aug-09 22:39
Andile.M11-Aug-09 22:39 
AnswerRe: Using Ajax Cascading dropdown with sql stored procedures Pin
keyur satyadev11-Aug-09 22:47
keyur satyadev11-Aug-09 22:47 
GeneralRe: Using Ajax Cascading dropdown with sql stored procedures Pin
Andile.M12-Aug-09 6:32
Andile.M12-Aug-09 6:32 
QuestionHow to get full path from fileupload control or every thing from client side? [modified] Pin
Saba0211-Aug-09 22:21
Saba0211-Aug-09 22:21 
AnswerRe: How to get full path from fileupload control or every thing from client side? Pin
Abhijit Jana11-Aug-09 22:23
professionalAbhijit Jana11-Aug-09 22:23 
GeneralRe: How to get full path from fileupload control or every thing from client side? Pin
Saba0211-Aug-09 22:35
Saba0211-Aug-09 22:35 
AnswerRe: How to get full path from fileupload control or every thing from client side? Pin
keyur satyadev11-Aug-09 22:59
keyur satyadev11-Aug-09 22:59 
GeneralRe: How to get full path from fileupload control or every thing from client side? Pin
Saba0211-Aug-09 23:07
Saba0211-Aug-09 23:07 
GeneralRe: How to get full path from fileupload control or every thing from client side? Pin
Abhijit Jana11-Aug-09 23:08
professionalAbhijit Jana11-Aug-09 23:08 
GeneralRe: How to get full path from fileupload control or every thing from client side? Pin
Saba0211-Aug-09 23:14
Saba0211-Aug-09 23:14 
QuestionCSV files Pin
dotnetmember11-Aug-09 22:06
dotnetmember11-Aug-09 22:06 
AnswerRe: CSV files Pin
r a m e s h11-Aug-09 22:20
r a m e s h11-Aug-09 22:20 
AnswerRe: CSV files Pin
Abhishek Sur12-Aug-09 0:45
professionalAbhishek Sur12-Aug-09 0:45 
QuestionClose any Specific page Pin
Pankaj1811-Aug-09 22:03
Pankaj1811-Aug-09 22:03 
AnswerRe: Close any Specific page Pin
Abhijit Jana11-Aug-09 22:29
professionalAbhijit Jana11-Aug-09 22:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.