Click here to Skip to main content
15,889,992 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Timing issue? Pin
twseitex28-Dec-13 8:53
twseitex28-Dec-13 8:53 
QuestionBackbone Pin
Rockerr Black23-Dec-13 22:18
Rockerr Black23-Dec-13 22:18 
AnswerRe: Backbone Pin
Richard MacCutchan24-Dec-13 0:52
mveRichard MacCutchan24-Dec-13 0:52 
AnswerRe: Backbone Pin
Rahul Rajat Singh29-Dec-13 20:50
professionalRahul Rajat Singh29-Dec-13 20:50 
AnswerRe: Backbone Pin
joginder-banger9-Jan-14 22:54
professionaljoginder-banger9-Jan-14 22:54 
QuestionDisplay the server time and refresh every 1 sec using Javascript in asp.net Pin
G.Mariappan(a)Murugan23-Dec-13 18:41
G.Mariappan(a)Murugan23-Dec-13 18:41 
AnswerRe: Display the server time and refresh every 1 sec using Javascript in asp.net Pin
Richard MacCutchan23-Dec-13 22:18
mveRichard MacCutchan23-Dec-13 22:18 
AnswerRe: Display the server time and refresh every 1 sec using Javascript in asp.net Pin
G.Mariappan(a)Murugan23-Dec-13 22:36
G.Mariappan(a)Murugan23-Dec-13 22:36 
Hi Richard,

Thanks for your reply i used javascript to get the server time
please see the below code its works for me

<script type="text/javascript">
//Users time
var timeLocal = new Date();
var timeServer = new Date('<%= DateTime.Now.ToString()%>');
//Calculate the difference (returns milliseconds)
millDiff = timeLocal - timeServer;

//initalize the clock on loading of page
window.onload = function () {
//set the interval so clock ticks
var timeClock = setInterval("TimeTick()", 1000);
}

//The ticking clock function
function TimeTick() {
//grab updated time
timeLocal = new Date();
//add time difference
timeLocal.setMilliseconds(timeLocal.getMilliseconds() - millDiff);
document.getElementById("lblserverTime")=timeLocal;

This code working fine for me...
AnswerRe: Display the server time and refresh every 1 sec using Javascript in asp.net Pin
joginder-banger9-Jan-14 23:01
professionaljoginder-banger9-Jan-14 23:01 
Questionjquery autocomplete not working though json is success Pin
Member 1047675719-Dec-13 1:17
Member 1047675719-Dec-13 1:17 
Questionalt attribute displayed when mouse leave Pin
dada201017-Dec-13 21:31
dada201017-Dec-13 21:31 
AnswerRe: alt attribute displayed when mouse leave Pin
twseitex28-Dec-13 8:43
twseitex28-Dec-13 8:43 
QuestionAutoFill plugin/extension which works for all browsers? Pin
Saad Sarwar4-Dec-13 8:36
Saad Sarwar4-Dec-13 8:36 
Questionjava question? Pin
rafiqtolas3-Dec-13 19:22
rafiqtolas3-Dec-13 19:22 
AnswerRe: java question? Pin
Blikkies3-Dec-13 20:21
professionalBlikkies3-Dec-13 20:21 
SuggestionRe: java question? Pin
Richard Deeming4-Dec-13 1:55
mveRichard Deeming4-Dec-13 1:55 
AnswerRe: java question? Pin
David Dekanozishvili5-Jan-14 2:37
professionalDavid Dekanozishvili5-Jan-14 2:37 
Questionadd to cart function to close pop-up window Pin
Member 104430993-Dec-13 15:46
Member 104430993-Dec-13 15:46 
AnswerRe: add to cart function to close pop-up window Pin
Sampath Sridhar3-Dec-13 21:24
Sampath Sridhar3-Dec-13 21:24 
GeneralRe: add to cart function to close pop-up window Pin
Member 104430994-Dec-13 1:36
Member 104430994-Dec-13 1:36 
GeneralRe: add to cart function to close pop-up window Pin
Sampath Sridhar4-Dec-13 1:52
Sampath Sridhar4-Dec-13 1:52 
GeneralRe: add to cart function to close pop-up window Pin
Member 104430994-Dec-13 2:10
Member 104430994-Dec-13 2:10 
SuggestionRe: add to cart function to close pop-up window Pin
Sampath Sridhar4-Dec-13 21:38
Sampath Sridhar4-Dec-13 21:38 
SuggestionRe: add to cart function to close pop-up window Pin
Amir Hamza Md. Kayes6-Dec-13 9:11
professionalAmir Hamza Md. Kayes6-Dec-13 9:11 
GeneralRe: add to cart function to close pop-up window Pin
Sampath Sridhar6-Dec-13 17:59
Sampath Sridhar6-Dec-13 17:59 

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.