Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



1 2 3 4 5 6 ... 33
Simulate the $_GET array from php in javascript to get url parameters this way: url= http://localhost/?var1=example $_GET['var1'] will return "example" Just copy and paste the code.
2 1342 posted 12 years ago by sergiazow
Comprueba la existencia de una cadena de texto en un input con javascript. (LA impresion del input está en CAKEPHP)
0 897 posted 12 years ago by serialk89
Original by dvdrtrgn
0 1196 posted 12 years ago by guilhermehn
This send any value via POST to a PHP page. It is done with AJAX, so the POST return can be used on the same page as the submit
0 1336 posted 12 years ago by rickygri
This javascript function takes the URL of the target page and an associative array of name/values paires and POSTs the data to the supplied URL by dynamically creating a form and then submitting it.
0 3090 posted 12 years ago by rickygri
The following javascript allows your to embed a video as a overlay on any HTML page. The script needs to be added in the head or external file, and the div tag needs to be placed on the page where you want the video image to show up. Another optio...
0 1066 posted 12 years ago by ptlrikin
In this section we're going to explore the decorator - a structural design pattern that promotes code reuse and is a flexible alternative to subclassing. This pattern is also useful for modifying existing systems where you may wish to add additional...
0 881 posted 12 years ago by timsommer
The Factory Pattern suggests defining an interface for creating an object where you allow the subclasses to decide which class to instantiate. This pattern handles the problem by defining a completely separate method for the creation of objects and w...
2 855 posted 12 years ago by timsommer
When we put up a facade, we present an outward appearance to the world which may conceal a very different reality. This was the inspiration for the name behind the facade pattern. The facade pattern provides a convenient higher-level interface to a l...
0 779 posted 12 years ago by timsommer
The Command pattern aims to encapsulate method invocation, requests or operations into a single object and gives you the ability to both parameterize and pass method calls around that can be executed at your discretion. In addition, it enables you...
0 857 posted 12 years ago by timsommer
In software engineering, a mediator is a behavioral design pattern that allows us to expose a unified interface through which the different parts of a system may communicate. If it appears a system may have too many direct relationships between modu...
0 875 posted 12 years ago by timsommer
The module pattern was originally defined as a way to provide both private and public encapsulation for classes in conventional software engineering. In JavaScript, the module pattern is used to further emulate the concept of classes in such a way t...
0 833 posted 12 years ago by timsommer
In object literal notation, an object is described as a set of comma-separated name/ value pairs enclosed in curly braces ({}). Names inside the object may be either strings or identifiers that are followed by a colon. There should be no comma used...
0 742 posted 12 years ago by timsommer
In conventional software engineering, the singleton pattern can be implemented by creating a class with a method that creates a new instance of the class if one doesn't In conventional software engineering, the singleton pattern can be implemented b...
1 934 posted 12 years ago by timsommer
Easy-to-use leaderboard
0 1064 posted 12 years ago by chrisaiv
format numbers in javascript with group digits
0 1552 posted 12 years ago by rg443
išorinio javascript failo įtraukimas į html
0 763 posted 12 years ago by ptomas
Calculates the amount of time since the date specified with yr, mon, and day. The parameter "countunit" can be "years", "months", or "days" and is the duration between the specified day and today in the selected denomination. The "decimals" parameter...
0 1095 posted 12 years ago by StevenW721
In javascript there is no function for printing variables like you have PHP, I use print_r and var_dump a lot in PHP for dumping variables so I wanted to create a simular function in javascript.
0 1240 posted 12 years ago by satie83
How to retrieve entity StateCode (Status) in JavaScript by accessing CRM oDATA (REST) Service
0 1370 posted 12 years ago by toLL
How to launch custom dialog from JavaScript (for example from custom RibbonButton)
0 875 posted 12 years ago by toLL
Remove the item from the array changing the length of the array.
0 1172 posted 12 years ago by agarcim
This javascript will create a complex google javascript map with multiple locations selected marked. The map will be centered in the middle and zoomed so that all point can be seen. It also stylizes the map making it mostly desaturated with bits of o...
0 1505 posted 12 years ago by FatFolderDesigner
This javascript will create a google map on the div with the ID "the_map" and centered on an address with a marker on it. In this example the address is for Jet City Improv. More information on setup and customization at the link.
0 1326 posted 12 years ago by FatFolderDesigner
mini/micro javascript
0 845 posted 12 years ago by praveensewak
Both are functionally equivalent
1 719 posted 13 years ago by grasshoper
I am having an issue making the div stay opened when it gets animated
0 858 posted 13 years ago by skeletor1101
Here we have simple javascript HTML5 support.
1 973 posted 13 years ago by o0110o
1 2 3 4 5 6 ... 33