Home » Archive

Articles in the Javascript Category

Javascript, Webmasters »

[7 May 2011 | No Comment | 7 views]

Many of you are concerned with your site loading time..
Well here is a way to reduce the loading time.
Combining Javascripts..
Suppose you have:
http://www.yoursite.com/javascript/prototype.js
http://www.yoursite.com/javascript/builder.js
http://www.yoursite.com/javascript/effects.js
http://www.yoursite.com/javascript/dragdrop.js
http://www.yoursite.com/javascript/slider.js
you can represent them as
http://www.yoursite.com/javascript/prototype.js,builder.js,effects.js,dragdrop.js,slider.js
Combining JavaScripts and CSS:
The idea is that you have one directory for css files and one directory for javascript files on your server. If you rewrite the URLs that point to these directories to a small script that intercepts the requests for those files. The script loads the file from disk and compresses it using gzip. It then sends that compressed file back to the …

Internet Explorer, Javascript »

[5 May 2011 | No Comment | 4 views]

If we know how to debug JavaScript like any other programming language, we don’t need much help on this topic.
First Method:
So here is the trick: .NET has given us the facility to debug JavaScript, but before that, we need to do some settings in Internet Explorer.
Tools ? Internet Options ? Advanced Tab
Uncheck Disable script debugging (Internet Explorer) & Uncheck Disable script debugging (Others) and restart IE
Now in a Visual Studio Project, on the aspx page in the script blog, type the debugger keyword as shown below:
function Disable(controlId) {
debugger
document.getElementById(controlId.id).disabled = true;
window.open(“second.htm”);
}
Now …