TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anish Khan
NA
25
0
Display digital clock on asp.net page
Sep 18 2009 2:22 AM
Hi Friends,
I want to display digital clock on my asp.net master page.
I am using thi code..
<
script
language
="javascript"
type
="text/javascript">
function
startTime() {
var
today =
new
Date();
var
h = today.getHours();
var
m = today.getMinutes();
var
s = today.getSeconds();
// add a zero in front of numbers<10
m = checkTime(m);
s = checkTime(s);
document.getElementById(
'txtt'
).value = h +
":"
+ m +
":"
+ s;
t = setTimeout(
'startTime()'
, 500);
}
function
checkTime(i) {
if
(i < 10) {
i =
"0"
+ i;
}
return
i;
}
</
script
>
Note:- txtt is a textbox id.
And it is printing an error like:- Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object
Please send me the code for this..
Thanks
Anish
Reply
Answers (
0
)
creating p2p wcf chat application to communicate between 2 particular clients(private message).....
How we can upload a video or flash file in asp.net