Category: script

B

Bat file to rename .js file to another format and back to .js

I faced a lot of issues with my mail exchange server quarantining my js files when i mail it my client. The way out of it was by renaming the .js file to .bak. But as the number of js files increased, it became a tedious process. So I thought of creating a bat file which ...

&

‘Add to Favourites’ button javascript

Here is a simple code, that i found useful from dynamicdrive. You can use for 'Add to Favourites' button in HTML. Add them in your head tag: <script type="text/javascript"> /*********************************************** * Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ ...

H

How to get the javascript version?

Javascript is evolving. With newer version, more commands, new functionalities gets added. To get to know the version of javascript your browser supports, just save the following code as html and load it in your browser: <script type="text/javascript"> var jsver = 1.0; </script> <script language="Javascript1.1"> jsver = 1.1; </script> <script language="Javascript1.2"> jsver = 1.2; </script> ...

W

When Microsoft or Google CDN fails, what should u do?

// Let me tell you one thing, an outage in CDN is very rare. But just in case you don't want to take a risk, go ahead with this fallback mechanism, as suggested by Scott Guru. Microsoft CDN outage for jQuery: <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript"> if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='/Scripts/jquery-1.4.2.min.js' type='text/javascript'%3E%3C/script%3E")); ...

M

Making SSRS multiselect dropdowns searchable combobox

SSRS Multiselect dropdowns are pretty powerful. Just to add on to the power of it, i felt it would be good to add on a searchable combobox functionality. As and when the user types in a text, the dropdown filters the value and displays only the required results in the dropdown. Also to ensure that ...

j

jQuery noConflict Tips

Some tips which i feel you need to know before using jQuery library: 1. You can use jQuery instead of $. 2. Predefined alias for jQuery: you can assign jQuery to any variable. With this you can load any versions of jQuery into your site. <!-- load jQuery 1.1.3 --> <script type="text/javascript" src="http://code.jquery.com/jquery-1.1.3.js"></script> <script type="text/javascript" ...

J

Javascript Trim, Left Trim & Right Trim Functions

Javascript string property does not have the normal trim functions like we have in any other language. And these trim functions appears play a crucial role in any code based on strings. There are two approaches i give here. One is directly creating a prototype method and other as a standalone function. You can choose ...

J

Javascript pause method: To create delays in javascripts

Creating delays in javascript can be very essential under certain specific scenarios, though i would recommend you to avoid it in most cases. The right way to create a delay would be by using setTimeOut method in javascript, as below: setTimeout("alert('hello world')",1500); // shows alertbox after 1500 milliseconds The lazy way or to be precise ...

H

How to enable javascript in various browsers – help file

This is a help reference for those sites, which are javascript critical. You can use this in a page to which you redirect in your javascript disabled scenario. Microsoft Internet Explorer 1. On the Tools dropdown menu, click Internet Options, and then click the Security tab. 2. Click on the earth «Internet» icon, and then ...

B

Best PNG Fix for IE 6

PNG fix for IE6 has always been messier than expected. There has been lot of out of the box solutions available on the net. However, the best that worked for me was the "DD Belated PNG" fix. It is a simple PNG fix specific for IE 6. I would recommend you to load it with ...