<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - noah</title>
<link>http://snipplr.com/users/noah/tags/event</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 15 Feb 2012 06:05:37 GMT</pubDate>
<item>
<title>(Emacs Lisp) Sexp for an Org-mode reocurring appointment, only on weekdays</title>
<link>http://snipplr.com/view/16561/sexp-for-an-orgmode-reocurring-appointment-only-on-weekdays/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 01 Jul 2009 12:56:08 GMT</pubDate>
<guid>http://snipplr.com/view/16561/sexp-for-an-orgmode-reocurring-appointment-only-on-weekdays/</guid>
</item>
<item>
<title>(JavaScript) Alter an existing, hard-coded onclick function</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) click on an element across browsers</title>
<link>http://snipplr.com/view/3336/click-on-an-element-across-browsers/</link>
<description><![CDATA[ <p>If you have assigned an event handler to a container, you might want to remotely trigger it as if a child of the container had been clicked.  That is, you might want to manually set the target of the 'event' object that is passed to the event handler on the container.  This helps to keep the number of event handlers down.</p> ]]></description>
<pubDate>Fri, 20 Jul 2007 18:08:37 GMT</pubDate>
<guid>http://snipplr.com/view/3336/click-on-an-element-across-browsers/</guid>
</item>
</channel>
</rss>
