Saturday, March 21, 2009

Short Cut Keys


A while ago I found some of my friends do not know how to use short cut keys.

They love mouse and they think short cut keys are hard to remember.

Indeed I find short cut keys help me to work faster.

Ctrl + Z – Undo

Ctrl + Y - Redo

Ctrl + A – Select All

Ctrl + C – Copy

Ctrl + V – Paste

Shift + Arrow keys – Select

F2 – Rename

F5 – Execute (For running script use)

Alt + Tab – switch between windows (Left to Right)

Alt + Tab + Shift – switch between windows (Right to Left)

Tab – go to next field in a web page (Left to Right)

Shift + Tab – go to next field in a web page (Right to Left)

Try to use it and when you get use of it, you don’t have to recall what they are. :)

Friday, March 20, 2009

Debug Client Site Scripting (JavaScript) through IE

How dumb of me, I never thought we can actually do this.

When you browse a page by using Internet Explorer that contains script error, you will see an alert sign at the bottom left of the IE.



Sometime you might able to understand where is the cause of the error by click on the alert sign and click “Show Details>>”.

But most of the time, I don’t get to find the error even with the line number provided.



How can you fix the JavaScript error then?

1. Configure your Internet Explorer to enable script debugging.



On IE, goto Option > Advanced

Uncheck “Disable script debugging” for both Internet Explorer and Other, and click Apply.


2. Run your page again, and click yes to debug the page when encountered error.

Select a debugger and start debugging by using breakpoint!


Ps: The code must not be too long in each line. Else the debugger only able to show the line number but not able locates the bug.