<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/javascript/tags/data</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 22 May 2013 19:23:12 GMT</pubDate>
<item>
<title>(JavaScript) datos formatavimas siuntimui į CRM WS - ptomas</title>
<link>http://snipplr.com/view/66183/datos-formatavimas-siuntimui--crm-ws/</link>
<description><![CDATA[ <p>CRM lauke esančios datos formatavimas skiriasi nuo tos, kurią reikia paduoti web serviso, kuris įrašo duomenis į CRM. Kodo dalis suformatuoja datą WS suprantama forma</p> ]]></description>
<pubDate>Tue, 17 Jul 2012 19:48:45 GMT</pubDate>
<guid>http://snipplr.com/view/66183/datos-formatavimas-siuntimui--crm-ws/</guid>
</item>
<item>
<title>(JavaScript) Increment/decrement input fields with values that have units - jatkins</title>
<link>http://snipplr.com/view/64331/incrementdecrement-input-fields-with-values-that-have-units/</link>
<description><![CDATA[ <p>Released into the public domain.</p> ]]></description>
<pubDate>Tue, 03 Apr 2012 20:37:27 GMT</pubDate>
<guid>http://snipplr.com/view/64331/incrementdecrement-input-fields-with-values-that-have-units/</guid>
</item>
<item>
<title>(JavaScript) Capturing Relative Accelerometer Tilt - parkerkrhoyt</title>
<link>http://snipplr.com/view/60528/capturing-relative-accelerometer-tilt/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 04 Nov 2011 02:47:19 GMT</pubDate>
<guid>http://snipplr.com/view/60528/capturing-relative-accelerometer-tilt/</guid>
</item>
<item>
<title>(JavaScript) Local Storage HTML5 Wrapper - cmndo</title>
<link>http://snipplr.com/view/54570/local-storage-html5-wrapper/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 29 May 2011 16:36:25 GMT</pubDate>
<guid>http://snipplr.com/view/54570/local-storage-html5-wrapper/</guid>
</item>
<item>
<title>(JavaScript) AJAX MySQL Query - danhanly</title>
<link>http://snipplr.com/view/47603/ajax-mysql-query/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 20 Jan 2011 20:48:06 GMT</pubDate>
<guid>http://snipplr.com/view/47603/ajax-mysql-query/</guid>
</item>
<item>
<title>(JavaScript) Simple JavaScript Form Check - FatFolderDesigner</title>
<link>http://snipplr.com/view/46271/simple-javascript-form-check/</link>
<description><![CDATA[ <p>This is a simple and effective way yo make sure people are actually filing out a form before submitting it. If you need to verify content it should be done server side (so that if you come across the odd person with javascript turned off it wont break something) but if you want to do a js check then you can easily add the code inside each elements if statement. 

Also, if your form is larger than just a few items your probably better off doing it from a more advanced, but much smaller script.

Oh, and with it's current setup your submit button needs the type of button, or it needs to be changed to return a true/false once the checks have been processed.</p> ]]></description>
<pubDate>Thu, 30 Dec 2010 08:25:02 GMT</pubDate>
<guid>http://snipplr.com/view/46271/simple-javascript-form-check/</guid>
</item>
<item>
<title>(JavaScript) Alter an existing, hard-coded onclick function - noah</title>
<link>http://snipplr.com/view/10273/alter-an-existing-hardcoded-onclick-function/</link>
<description><![CDATA[ <p>Get the existing hardcoded function, convert it to a string, edit the string.
Then strip the string down to just the function body, re-instantiate the string into a function, and assign it back to the onclick handler.

The code here is extremely site-specific.  Here's what the original onclick function I was working against looked like:

    new Ajax.Request('/publications?categories%5B%5D=1,2,3', {asynchronous:true, evalScripts:true, method:'get', parameters:'authenticity_token=' + encodeURIComponent('6b670face4ca93ce4bf53def7685d8663780b7d9')}); return false;

The code below just changes the query string in the first parameter.  The idea being that you have a bunch of checkboxes with IDs like foo-1, foo-2, and you want that query pram to reflect the number thats appended to the end of each checkbox's ID.  

Not that you want to do that :)  But hey, these kinds of situations sometimes come up in production.   Anyway, the **interesting bit** is JavaScript's ability to **break a function down into a string, edit the string, and then re-instantiate the string as a new function,** possibly overriding the original.

Functions as data: Mmmm... Lispy.

Tested only in Firefox 3 but should work in any browser.</p> ]]></description>
<pubDate>Thu, 04 Dec 2008 19:12:10 GMT</pubDate>
<guid>http://snipplr.com/view/10273/alter-an-existing-hardcoded-onclick-function/</guid>
</item>
<item>
<title>(JavaScript) The jQuery Data Store - 1man</title>
<link>http://snipplr.com/view/9715/the-jquery-data-store/</link>
<description><![CDATA[ <p>I didn't realise until now you could do this in jQuery, very useful. Store a value for later use, then remove it.</p> ]]></description>
<pubDate>Thu, 13 Nov 2008 10:45:01 GMT</pubDate>
<guid>http://snipplr.com/view/9715/the-jquery-data-store/</guid>
</item>
<item>
<title>(JavaScript) getAge - nicolaspar</title>
<link>http://snipplr.com/view/5913/getage/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 18 Apr 2008 23:59:41 GMT</pubDate>
<guid>http://snipplr.com/view/5913/getage/</guid>
</item>
<item>
<title>(JavaScript) Array Functions as Data - 1man</title>
<link>http://snipplr.com/view/4240/array-functions-as-data/</link>
<description><![CDATA[ <p>The important thing to notice is the () operator in a[2]. It is invoking the function inside a[0] with the argument a[1].</p> ]]></description>
<pubDate>Sun, 02 Dec 2007 07:59:36 GMT</pubDate>
<guid>http://snipplr.com/view/4240/array-functions-as-data/</guid>
</item>
<item>
<title>(JavaScript) Basic JSON File - 1man</title>
<link>http://snipplr.com/view/2323/basic-json-file/</link>
<description><![CDATA[ <p>Basic layout for the data contained in a JSON file.(JavaScript Obsect Notation).</p> ]]></description>
<pubDate>Wed, 14 Mar 2007 03:09:27 GMT</pubDate>
<guid>http://snipplr.com/view/2323/basic-json-file/</guid>
</item>
<item>
<title>(JavaScript) Ajax Parsing XML Data - 1man</title>
<link>http://snipplr.com/view/2316/ajax-parsing-xml-data/</link>
<description><![CDATA[ <p>This function allows you to parse a simple XML document(passed to it using this.href on a onclick event). Virtually the same as JSON, the things that have been changed ate labeled !Important.</p> ]]></description>
<pubDate>Tue, 13 Mar 2007 09:54:15 GMT</pubDate>
<guid>http://snipplr.com/view/2316/ajax-parsing-xml-data/</guid>
</item>
<item>
<title>(JavaScript) Ajax Parsing JSON Data - 1man</title>
<link>http://snipplr.com/view/2315/ajax-parsing-json-data/</link>
<description><![CDATA[ <p>This function is near enough the same as parsing XML. The only things that have changed are the sections marked !important.</p> ]]></description>
<pubDate>Tue, 13 Mar 2007 09:47:32 GMT</pubDate>
<guid>http://snipplr.com/view/2315/ajax-parsing-json-data/</guid>
</item>
</channel>
</rss>