Click here to Skip to main content
12,253,990 members (64,372 online)

JavaScript

 
Questionhow can save a file through javascript Pin
vimal Tyagi Zindagi3-Apr-13 21:18
groupvimal Tyagi Zindagi3-Apr-13 21:18 
AnswerRe: how can save a file through javascript Pin
Sandeep Mewara3-Apr-13 23:30
mvpSandeep Mewara3-Apr-13 23:30 
QuestionUsing a javascript timer in a asp User Control Pin
Steve Holdorf1-Apr-13 11:09
memberSteve Holdorf1-Apr-13 11:09 
AnswerRe: Using a javascript timer in a asp User Control Pin
Steve Holdorf2-Apr-13 0:46
memberSteve Holdorf2-Apr-13 0:46 
AnswerRe: Using a javascript timer in a asp User Control Pin
Steve Holdorf2-Apr-13 1:46
memberSteve Holdorf2-Apr-13 1:46 
Questionvalidating candian postal codes Pin
jkirkerx31-Mar-13 12:12
memberjkirkerx31-Mar-13 12:12 
AnswerRe: validating candian postal codes [solved] Pin
jkirkerx1-Apr-13 7:20
memberjkirkerx1-Apr-13 7:20 
QuestionTime and date Pin
Tichaona J31-Mar-13 4:15
memberTichaona J31-Mar-13 4:15 
Am not sure what I’ve done wrong. The below code is supposed to show the time and date as Time|Date: 16:08:24 31/3/2013, however its now showing up as Time|Date: 16:08:24 0/3/2013…

<script>
function startTime()
{
var today=new Date();
var d=today.getDay();  //---Day Sunday
var dt=today.getDate();  //---Date 1-31
var mt=today.getMonth() + 1;  //---Month
var y=today.getFullYear();//---Year
var h=today.getHours();  //---Hours
var m=today.getMinutes(); //---Mintutes
var s=today.getSeconds(); //---Seconds
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML= "Time|Date:"+" "+h+":"+m+":"+s+ " " + d+"/"+mt+"/"+y;
t=setTimeout(function(){startTime()},500);
}
 
function checkTime(i)
{
if (i<10)
  {
  i="0" + i;
  }
return i;
}
</script>

Note: Everything else is fine except for the date, what with it bring up '0' instead of '31'
AnswerRe: Time and date Pin
dusty_dex31-Mar-13 4:41
memberdusty_dex31-Mar-13 4:41 
QuestionJquery - Setting focus on Canvas Pin
Simon Lee Shugar29-Mar-13 2:54
memberSimon Lee Shugar29-Mar-13 2:54 
AnswerRe: Jquery - Setting focus on Canvas Pin
Jasmine250129-Mar-13 6:55
memberJasmine250129-Mar-13 6:55 
GeneralRe: Jquery - Setting focus on Canvas Pin
Simon Lee Shugar3-Apr-13 12:51
memberSimon Lee Shugar3-Apr-13 12:51 
AnswerRe: Jquery - Setting focus on Canvas Pin
jkirkerx30-Mar-13 18:57
memberjkirkerx30-Mar-13 18:57 
AnswerRe: Jquery - Setting focus on Canvas Pin
Dennis E White2-Apr-13 5:57
memberDennis E White2-Apr-13 5:57 
GeneralRe: Jquery - Setting focus on Canvas Pin
jkirkerx2-Apr-13 6:28
memberjkirkerx2-Apr-13 6:28 
GeneralRe: Jquery - Setting focus on Canvas Pin
Dennis E White2-Apr-13 6:35
memberDennis E White2-Apr-13 6:35 
GeneralRe: Jquery - Setting focus on Canvas Pin
jkirkerx2-Apr-13 6:38
memberjkirkerx2-Apr-13 6:38 
GeneralRe: Jquery - Setting focus on Canvas Pin
Dennis E White2-Apr-13 6:42
memberDennis E White2-Apr-13 6:42 
GeneralRe: Jquery - Setting focus on Canvas Pin
Simon Lee Shugar3-Apr-13 12:50
memberSimon Lee Shugar3-Apr-13 12:50 
AnswerRe: Jquery - Setting focus on Canvas Pin
AspDotNetDev7-Apr-13 13:10
protectorAspDotNetDev7-Apr-13 13:10 
GeneralRe: Jquery - Setting focus on Canvas Pin
Simon Lee Shugar7-Apr-13 21:34
memberSimon Lee Shugar7-Apr-13 21:34 
QuestionAJAX Javascript ShowModalDialogBox in IE 7 and above not working Pin
unniyadan28-Mar-13 20:53
memberunniyadan28-Mar-13 20:53 
AnswerRe: AJAX Javascript ShowModalDialogBox in IE 7 and above not working Pin
Prasad Khandekar11-Apr-13 3:44
memberPrasad Khandekar11-Apr-13 3:44 
QuestionAJ Pin
unniyadan28-Mar-13 20:52
memberunniyadan28-Mar-13 20:52 
QuestionJquery JqGrid Pin
Member 962382927-Mar-13 2:30
memberMember 962382927-Mar-13 2:30 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.160426.1 | Last Updated 5 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid