Advertisement
neilmcd

Untitled

May 10th, 2011
1,117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.88 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function ISODateString(d){
  5.  function pad(n){return n<10 ? '0'+n : n}
  6. return d.getUTCFullYear()+'-'
  7.      + pad(d.getUTCMonth()+1)+'-'
  8.      + pad(d.getUTCDate())+'T'
  9.      + pad(d.getUTCHours())+':'
  10.      + pad(d.getUTCMinutes())+':'
  11.      + pad(d.getUTCSeconds())+'Z'}
  12.  
  13. function loadCal(calType){
  14.     var today = new Date();
  15.     var formattedDate = ISODateString(today);
  16.     var objFrame = document.getElementById("calendar_iframe");
  17.     var calSource = "/calendar/" + calType.toString() +".aspx?date=" + formattedDate;
  18.     objFrame.src=calSource;
  19. }
  20. </script>
  21. </head>
  22. <body onload="loadCal('Month')">
  23. <a href="#" onclick="loadCal('Day')">Day </a>
  24. <a href="#" onclick="loadCal('Week')">Week </a>
  25. <a href="#" onclick="loadCal('Month')">Month</a>
  26. <iframe name ="calendar_iframe" frameborder="0" width="100%" height="95%"></iframe>
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement