Function.prototype.promise





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

8
Date Submitted Mon. Sep. 25th, 2006 1:36 AM
Revision 1
Syntax Master sundaramkumar
Tags JavaScript
Comments 1 comments
Format fractional digits in a numbe
20
Date Submitted Mon. Sep. 25th, 2006 1:59 AM
Revision 1
Syntax Master sundaramkumar
Tags JavaScript
Comments 3 comments
To debug javascript code we use alert() whereever needed and it irritates you while alerts values inside a loop and other places where more alerts are being shown and you have to press the ok button to pass / proceed on.
here is a simple way to get rid of the alerts dialogs and get the values outputed into another debug window.
13
Date Submitted Mon. Sep. 25th, 2006 2:22 AM
Revision 1
Syntax Master sundaramkumar
Tags JavaScript
Comments 1 comments
Trim , Left trim (ltrim) and Right Trim (rtrim) in javascript
10
Date Submitted Wed. Sep. 27th, 2006 11:03 AM
Revision 1
Scripter shachi
Tags click | Control | ctrl/shift | JavaScript
Comments 3 comments
Gives you control to perform actions when the control key and the mouse button is clicked in the same time. Something similar to selecting elements in Windows with ctrl+click.

Just change the event.ctrlKey to event.shiftKey to make it shift+click. If you don't get it don't worry the snippet contains the demo for shift+click too.

You may need to change the event.which though 1 = left click, 2 = middle click, 3 = right click(at least in firefox 1.5.0.5)
-9
Date Submitted Sat. Sep. 30th, 2006 11:06 AM
Revision 1
Scripter shachi
Tags JavaScript | strip_tags
Comments 1 comments
Strips all tags from any string.
12
Date Submitted Mon. Oct. 2nd, 2006 11:59 AM
Revision 1
Beginner drench
Tags escape | HTML | JavaScript | String
Comments 0 comments
Similar to Perl's CGI::escapeHTML(), though (because we can!) this adds it as a method to all String objects.
13
Date Submitted Mon. Oct. 2nd, 2006 1:05 PM
Revision 1
Beginner drench
Tags Array | JavaScript | List | Random | shuffle
Comments 3 comments
It works with Array types. The example is a simple list of numbers, but the array could contain anything; lists of strings, functions, DOM nodes, whatever. Unfortunately, a lot of things that seem like arrays in the DOM aren't really, so you can't shuffle the images on a page with just document.images.shuffle() all by itself.
12
Date Submitted Tue. Oct. 3rd, 2006 5:51 AM
Revision 1
Helper Thomas
Tags Email | JavaScript | spam
Comments 1 comments
Here's a simple JavaScript solution to hide your e-mail from many spam scripts while still providing clickable hyperlinks to your visitors.

Web crawlers and visitors with JavaScript disabled will see: me [at] mydomain [dot] com. I've seen a lot of people that just leave it at this, but it seems a bit unprofessional in my opinion. With the following code, we can replace that with a fully functional hyperlink.
12
Date Submitted Tue. Oct. 3rd, 2006 6:42 AM
Revision 1
Syntax Master sundaramkumar
Tags JavaScript
Comments 0 comments
A simple Tooltip for you web pages with minimal code.
Images , Text and HTML code can be shown inside the tootip
11
Date Submitted Thu. Oct. 5th, 2006 12:01 PM
Revision 1
Helper Idlemind
Tags ajax | JavaScript
Comments 4 comments
I use this in my AJAX as a quick way to get the Value of the selected item in a Select HTML object. If nothing is selected, it returns zero.
(May be basic to y'all, but maybe really usefull to someone else).