Monday, October 04, 2010

JavaScript: Count down Timer

This is how creating Count down timer using JavaScript with Julian dates. This code below creates two Julian dates, now and newYear. By subtracting now from newYear we get an integer which represents the difference between the two dates.

Suppose you want to know your birthday in days, hours and minutes etc. This is how you can achieve using JavaScript.

<!-- This span is where the countdown timer will appear -->
<div id='countdown'></div>
<script type="text/javascript">
// Here's our countdown function.
function happyBirthDay() {
var now = new Date();
var newYear = new Date('October 20, '+(now.getFullYear()+1));
var diff=newYear-now;
var milliseconds=Math.floor(diff % 1000);   
    diff=diff/1000;            
var seconds=Math.floor(diff % 60);
    diff=diff/60;
var minutes=Math.floor(diff % 60);
    diff=diff/60;
var hours=Math.floor(diff % 24);
    diff=diff/24;
var days=Math.floor(diff);
// We'll build a display string instead of doing document.writeln
   var outStr = days + ' days, ' + hours+ ' hours, ' + minutes;
       outStr+= ' minutes, ' + seconds + ' seconds until your birthday!'; 
   // Insert our display string into the countdown span.
   document.getElementById('countdown').innerHTML=outStr;
   // call this function again in exactly 1 second.   
   setTimeout("happyBirthDay()",1000);
}
// call the countdown function (will start the timer)
happyBirthDay();   
</script>

Hope this helps!

Saturday, October 02, 2010

HTML Codes - Characters and symbols

I have found collection of information about HTML codes, ASCII Codes, URL Encoding, URL Decoding which is helpful.

Check this URL for more information.

Thursday, September 23, 2010

IE9: Top keyboard shortcuts

Set aside your mouse and use these keyboard shortcuts to help keep you browsing more efficiently. In Internet Explorer 9, some of your most frequent and essential tasks can be accomplished more quickly by using the keyboard.

Press this

To do this

Alt

Show the menu bar. After you make a selection, the menu bar goes away.

Alt+M

Go to your homepage.

Alt+C

View your favorites, feeds, and browsing history.

Ctrl+J

Open Download Manager.

Ctrl+L

Highlight the text in the Address bar.

Ctrl+D

Add a webpage to your favorites.

Ctrl+B

Organize your favorites.

How to uninstall Internet Explorer 9

Some users may have installed the beta of IE9 to just to have a sneak peak of it and want to go back to a previous version of Internet Explorer after testing the beta release on their computer. The question came up if the installation of Internet Explorer 9 affects another version of Internet Explorer on the operating system. The answer to that question was yes: Internet Explorer 9 replaces an older version of Internet Explorer during installation. So you need to uninstall IE9 to go back to stable version of Internet Explorer.
Unlike most other programs on your computer, however, you won't find IE9 listed on the Uninstall or change a program screen. Windows Internet Explorer 9 has been installed as a system update in the operating system.

Here's what you need to do to uninstall IE9 on Windows Vista or Windows 7:

  • Click Win+R and type appwiz.cpl. click your windows button and type view updates in the search box
  • Once the results appear, click view installed updates
      Don't want to search? Press Win+R and paste in the following:
      C:\Windows\explorer.exe shell:::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}
      then press Enter.
  • Wait for the Uninstall an update screen to load completely
  • Scroll through the list until you find Windows Internet Explorer 9 (see fig below)
  • Click once to highlight IE9, then click the uninstall button (or right-click and uninstall)
  • Confirm that you want to uninstall (click yes)

    ie9unistall

  • Click one of the following:
    • Restart now (to finish the process of uninstalling Internet Explorer 9, and restore the previous version of Internet Explorer).

    • Restart later (to wait until you shut down or restart your computer).

    Hope this helps!

    Saturday, September 18, 2010

    How to solve Internet Explorer 9 installation problems?

    Problems having installing IE9 on Vista, Windows7 or Windows 2008. Here is a beautiful summary of troubleshooting these issues from Microsoft. This URL have all the necessary information about Pre requisites and resolutions.

    Click this URL for more information.