<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gilluminate &#187; JavaScript</title>
	<atom:link href="http://www.gilluminate.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gilluminate.com</link>
	<description>By Jason Gill</description>
	<lastBuildDate>Sat, 28 Jan 2012 21:01:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Using JQuery to enable optgroup in CForms</title>
		<link>http://www.gilluminate.com/2011/08/08/using-jquery-to-enable-optgroup-in-cforms/</link>
		<comments>http://www.gilluminate.com/2011/08/08/using-jquery-to-enable-optgroup-in-cforms/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 14:30:26 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[CForms]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.gilluminate.com/?p=5941</guid>
		<description><![CDATA[CForms II is an extremely robust and useful plugin for WordPress. One of the main frustrations I&#8217;ve noticed people have with it is the lack of optgroup support with select boxes. I wrote this little piece of JQuery code that will allow you to enable optgroup: if($(".cform").length!=0){ $(".cform select option").each(function(){ if($(this).val() == "groupstart"){ var label [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.deliciousdays.com/cforms-plugin/">CForms II</a> is an extremely robust and useful plugin for WordPress. One of the main frustrations I&#8217;ve noticed people have with it is the lack of optgroup support with select boxes. I wrote this little piece of JQuery code that will allow you to enable optgroup:</p>
<pre>if($(".cform").length!=0){
  $(".cform select option").each(function(){
    if($(this).val() == "groupstart"){
      var label = $(this).text();
      $(this).nextUntil('option[value|="groupend"]')
        .wrapAll("&amp;lt;optgroup label='"+label+"' /&amp;gt;");
      $(this).detach();
    }
  });
  $('option[value|="groupend"]').detach();
}</pre>
<p>Once you have that code in place, all you need to do is add <em>groupstart</em> and <em>groupend</em> codes to your cforms settings for your select box. For the <em>groupstart</em> you will add it as though it were just another option, with the label being the label you want for your group, and the value being the literal string &#8220;groupstart.&#8221; For the groupend, it doesn&#8217;t matter what the label is, as long as the value is &#8220;groupend.&#8221; It&#8217;s easiest just to use groupend as the label, and leaving the value empty so that CForms will automatically use the label as the value.</p>
<p>Here&#8217;s an example of how to form your CForms settings in conjunction with the JQuery code above:</p>
<p>Color#Choose|#Warm Colors|groupstart#red#orange#yellow#groupend#Cool Colors|groupstart#blue#green#purple#groupend#brown#black#white</p>
<p>Which will result in the following:<br />
<img class="size-full wp-image-5948" src="http://www.gilluminate.com/wp-content/uploads/optgroup-cforms.png" alt="" width="457" height="192" /></p>
<p>Let me know if this works as well for you as it did for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2011/08/08/using-jquery-to-enable-optgroup-in-cforms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting MediaWiki Collapsible Nav to Load Collapsed</title>
		<link>http://www.gilluminate.com/2011/01/13/getting-mediawiki-collapsible-nav-to-load-collapsed/</link>
		<comments>http://www.gilluminate.com/2011/01/13/getting-mediawiki-collapsible-nav-to-load-collapsed/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 20:03:05 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://www.gilluminate.com/?p=5840</guid>
		<description><![CDATA[Whether you are using the old UsabilityInitiative extension, or the new split out Vector enhancements, you may have noticed an issue where the Collapsible Navigation functionality causes the first nav item in your list to remain open when the page loads. It doesn&#8217;t behave like the rest of the nav items that will remain in [...]]]></description>
			<content:encoded><![CDATA[<p>Whether you are using the old <a href="http://www.mediawiki.org/wiki/Extension:UsabilityInitiative">UsabilityInitiative</a> extension, or the new split out <a href="http://www.mediawiki.org/wiki/Extension:Vector">Vector</a> enhancements, you may have noticed an issue where the Collapsible Navigation functionality causes the first nav item in your list to remain open when the page loads. It doesn&#8217;t behave like the rest of the nav items that will remain in their closed or open state when you move to another page in your wiki. It simply remains open no matter what. If you wish to solve this little bug, you can replace line 3 of Vector.combined.min.js with the following:</p>
<pre>$j('#mw-panel').addClass('collapsible-nav');
$j('#mw-panel &gt; div.portal').each(function(){if($j.cookie('vector-nav-'+$j(this).attr('id'))=='true'){$j(this).addClass('expanded').find('div.body').show();}else{$j(this).addClass('collapsed');}});
$j('#mw-panel &gt; div.portal &gt; h5').click(function(){$j.cookie('vector-nav-'+$j(this).parent().attr('id'),$j(this).parent().is('.collapsed'));
$j(this).parent().toggleClass('expanded').toggleClass('collapsed').find('div.body').slideToggle('fast');return false;});});
$j(document).ready(function(){if(!wgVectorEnabledModules.collapsibletabs){return true;}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2011/01/13/getting-mediawiki-collapsible-nav-to-load-collapsed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Time Tracking Report Bookmarklet for Basecamp</title>
		<link>http://www.gilluminate.com/2011/01/10/time-tracking-report-bookmarklet-for-basecamp/</link>
		<comments>http://www.gilluminate.com/2011/01/10/time-tracking-report-bookmarklet-for-basecamp/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 22:37:09 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[Basecamp]]></category>
		<category><![CDATA[Bookmarklet]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Shortcut]]></category>

		<guid isPermaLink="false">http://www.gilluminate.com/?p=5829</guid>
		<description><![CDATA[If you&#8217;ve ever tracked your time in Basecamp, and you are forgetful like me, you know that sometimes it&#8217;s a pain to go check how much time you&#8217;ve already tracked. When you forget to check your time as you go, you end up going back and fill in the blanks. The process involves a few [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever tracked your time in <a href="http://basecamphq.com/">Basecamp</a>, and you are forgetful like me, you know that sometimes it&#8217;s a pain to go check how much time you&#8217;ve already tracked. When you forget to check your time as you go, you end up going back and fill in the blanks. The process involves a few too many clicks, and not any way to really create a shortcut. First, you need to click the Time tab, which shows everyone in your group&#8217;s time and it orders by company, not by date or project. Cool, if you are a manager after an overview. Not cool, if you are a worker-bee trying to see your own time for the day. So, next, you click Create a Report in the upper right corner, click a bunch of options to select yourself and get the start and end date the same, then click the Create report button. WALAH! A usable report. But the URL contains all of the data for the day you bookmarked it. If you bookmark it, you are stuck changing the URL in 2 different places to update the date to today, which is almost as time consuming as just running the report again.</p>
<p>So, I came up with this tiny bookmarklet that I find extremely useful. So I decided to share.</p>
<p>Before you start using it, you need to find your Basecamp ID. When you first run the report I mentioned above, your ID is the 7 digits that appear in the URL after subject_id=. Once you have that, you need to tweak the bookmarklet to contain that ID, otherwise it won&#8217;t work. That being said, you can technically create more bookmarklets for everyone/anyone in your company using their ID. If that tickles your fancy.</p>
<p>[added 1/20/2010] You also need to tweak the bookmarklet to contain your domain. Replace &#8220;yourdomain&#8221; in the url with yours.</p>
<p>So, you have 2 options.</p>
<p>1) Copy this code, create a New Bookmark using your favorite browser, paste it in and edit the ID where it says &#8220;YourID,&#8221; edit the domain where it says &#8220;yourdomain&#8221; and then save it:</p>
<pre>javascript:void(cd=new%20Date());if(cd){location.href=%22https://&lt;em&gt;&lt;strong&gt;yourdomain&lt;/strong&gt;&lt;/em&gt;.basecamphq.com/time_entries/report?subject_id=&lt;em&gt;&lt;strong&gt;YourID&lt;/strong&gt;&lt;/em&gt;&amp;from=%22+cd;}</pre>
<p>— or —</p>
<p>2) Drag this link to your bookmarks, then edit the bookmark to contain the ID in place of &#8220;YourID&#8221; and your domain in place of &#8220;yourdomain&#8221;:</p>
<p><a href="//yourdomain.basecamphq.com/time_entries/report?subject_id=YourID&amp;from=%22+cd;}">Today&#8217;s Time</a></p>
<p>I hope this helps someone else. Comment below and let me know if you end up using it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2011/01/10/time-tracking-report-bookmarklet-for-basecamp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using JQuery to reveal using a slide up effect</title>
		<link>http://www.gilluminate.com/2009/09/09/using-jquery-to-reveal-using-a-slide-up-effect/</link>
		<comments>http://www.gilluminate.com/2009/09/09/using-jquery-to-reveal-using-a-slide-up-effect/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 05:35:46 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.gilluminate.com/?p=5519</guid>
		<description><![CDATA[The slideUp() method in JQuery is intended to hide the element rather than reveal it. It is basically the opposite of slideDown() which &#8220;unhides&#8221; your element by sliding it down. As you can see on this blog, I have an &#8220;About Jason Gill&#8221; tab in my heading. When clicked, this tab reveals information about who [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://docs.jquery.com/Effects/slideUp">slideUp()</a> method in <a href="http://jquery.com/">JQuery</a> is intended to hide the element rather than reveal it. It is basically the opposite of <a href="http://docs.jquery.com/Effects/slideDown">slideDown()</a> which &#8220;unhides&#8221; your element by sliding it down.</p>
<p><del>As you can see on this blog, I have an &#8220;About Jason Gill&#8221; tab in my heading. When clicked, this tab reveals information about who I am by sliding upward.</del> In figuring out how to do this, I of course consulted the Google gods and came up with a lot of people asking how, but few people providing answers. So, I&#8217;ve decided to post the solution I finally came up with hoping it will benefit others.</p>
<p>Basically, I am using two different effects to create what looks like one effect. What you are seeing is essentially a slideDown() in conjunction with an <a href="http://docs.jquery.com/Effects/animate">animate()</a> effect. The animate() is literally moving the info box upward at the same speed it is sliding down (in my case, &#8220;slow&#8221;).  I just had to measure the height of the #about_me box and animate it upward exactly that many pixels (in my case it was 171 pixels). To close the box, I simply animate downward at the same rate I slideUp. Technically, I&#8217;m using animate in conjunction with <a href="http://docs.jquery.com/Effects/slideToggle">slideToggle()</a>, but you get the idea.</p>
<p>You can take a look at my source, but I&#8217;ll post the javascript here for your convenience:</p>
<pre>$(document).ready(function(){
	var opened = false;
	$("#about_tab").click(function(){
		if(opened){
			$("#about_me").animate({"top": "+=171px"}, "slow");
		}else{
			$("#about_me").animate({"top": "-=171px"}, "slow");
		}
		$("#about_content").slideToggle("slow");
		$("#about_tab .close").toggle();
		opened = opened ? false : true;
	});
});</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2009/09/09/using-jquery-to-reveal-using-a-slide-up-effect/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Scriptaculous Autocomplete Page Jump Using Arrow Keys</title>
		<link>http://www.gilluminate.com/2009/01/20/scriptaculous-autocomplete-page-jump-using-arrow-keys/</link>
		<comments>http://www.gilluminate.com/2009/01/20/scriptaculous-autocomplete-page-jump-using-arrow-keys/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 21:02:30 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Scriptaculous]]></category>

		<guid isPermaLink="false">http://blog.gilluminate.com/?p=5306</guid>
		<description><![CDATA[When you use overflow:auto in your css in conjunction with Scriptaculous&#8217; Autocomplete, there is a bug that makes the entire page jump around when you use the arrow keys on your keyboard to navigate up and down through the suggestion list. This bug normally appears only when the page itself is long enough to require [...]]]></description>
			<content:encoded><![CDATA[<p>When you use overflow:auto in your css in conjunction with Scriptaculous&#8217; Autocomplete, there is a bug that makes the entire page jump around when you use the arrow keys on your keyboard to navigate up and down through the suggestion list. This bug normally appears only when the page itself is long enough to require a scroll bar.</p>
<p>I managed to come up with a very clean working solution by hacking the controls.js file that comes with scriptaculous. The solutions requires replacing the <em>markPrevious</em> and <em>markNext</em> functions and adding a small line of code to the <em>updateChoices</em> function.</p>
<p>Currently, <em>markPrevious</em> and <em>markNext</em> are telling the page to jump around like that, and I&#8217;m not sure why! As far as I can tell (please let me know otherwise) this solution could be included in the scriptaculous without breaking a thing (hint, hint to the scriptaculous team).</p>
<p>To implement the solution, replace:</p>
<pre>markPrevious: function() {
 if(this.index &gt; 0) this.index--;
  else this.index = this.entryCount-1;
   this.getEntry(this.index).scrollIntoView(true);
},

markNext: function() {
 if(this.index &lt; this.entryCount-1) this.index++;
  else this.index = 0;
  this.getEntry(this.index).scrollIntoView(false);
},</pre>
<p>With:</p>
<pre>markPrevious: function() {
 if(this.index &gt; 0) {this.index--;}
 else {
  this.index = this.entryCount-1;
  this.update.scrollTop = this.update.scrollHeight;
 }
 selection = this.getEntry(this.index);
 selection_top = selection.offsetTop;
 if(selection_top &lt; this.update.scrollTop){
  this.update.scrollTop = this.update.scrollTop-selection.offsetHeight;
 }
},

markNext: function() {
 if(this.index &lt; this.entryCount-1) {this.index++;}
 else {
  this.index = 0;
  this.update.scrollTop = 0;
 }
 selection = this.getEntry(this.index);
 selection_bottom = selection.offsetTop+selection.offsetHeight;
 if(selection_bottom &gt; this.update.scrollTop+this.update.offsetHeight){
  this.update.scrollTop = this.update.scrollTop+selection.offsetHeight;
 }
},</pre>
<p>Now find the <em>updateChoices</em> function and just after the code this.stopIndicator(); add this.update.scrollTop = 0; so that it looks like this:</p>
<pre>this.stopIndicator();
this.update.scrollTop = 0;
this.index = 0;</pre>
<p>I&#8217;ve tested in FF 2.0.0.4, FF 3.0.5, Chrome 1.0.154.43, Safari 3.2.1, Opera 9.5.1, IE 7.0.5730.13 and IE 6.0.2600 without problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2009/01/20/scriptaculous-autocomplete-page-jump-using-arrow-keys/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Using SWFObject for Flash Version Tracking</title>
		<link>http://www.gilluminate.com/2007/03/09/using-swfobject-for-flash-version-tracking/</link>
		<comments>http://www.gilluminate.com/2007/03/09/using-swfobject-for-flash-version-tracking/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 16:28:00 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Omniture]]></category>

		<guid isPermaLink="false">http://blog.gillumiante.com/2007/03/09/using-swfobject-for-flash-version-tracking</guid>
		<description><![CDATA[At my company, we use Omniture SiteCatalyst for our web analytics/tracking. Unfortunately, Omniture does not give user&#8217;s Flash Version statistics in their standard reports like Google Analytics does. On the other hand, Omniture gives you the freedom to create custom reports that you can determine on your own using their provided JavaScript code. I am [...]]]></description>
			<content:encoded><![CDATA[<p>At my company, we use <a href="http://www.omniture.com/">Omniture</a> <a href="http://www.omniture.com/products/web_analytics/sitecatalyst">SiteCatalyst</a> for our web analytics/tracking. Unfortunately, Omniture does not give user&#8217;s Flash Version statistics in their standard reports like <a href="http://www.google.com/analytics/">Google Analytics</a> does. On the other hand, Omniture gives you the freedom to create <a href="http://www.omniture.com/services/custom">custom reports</a> that you can determine on your own using their provided JavaScript code.</p>
<p>I am already using <a href="http://blog.deconcept.com/swfobject/">SWFObject</a> to load the flash piece on our homepage to users with a specified version. So I figured I could hack that code a bit in order to pull the version it was already determining for me, and plug it into the Omniture code.</p>
<p>After mulling through the SWFObject code, I finally was able to run this page successfully, which will alert the exact version of flash I am using:</p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
&lt;title&gt;test&lt;/title&gt;
&lt;script type="text/javascript" src="swfobject.js"&gt;&lt;/script&gt;
&lt;/head&gt;&lt;body&gt;
&lt;script type="text/javascript"&gt;
alert(deconcept.SWFObjectUtil.getPlayerVersion().major+
"."+deconcept.SWFObjectUtil.getPlayerVersion().minor+
"."+deconcept.SWFObjectUtil.getPlayerVersion().rev);
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Basically, you can use deconcept.SWFObjectUtil.getPlayerVersion().major to get the major version, etc.</p>
<p>Once I got that working, I was able to use that same concept to plug it into my tracking code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2007/03/09/using-swfobject-for-flash-version-tracking/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Prevent copy/paste and Print Screen online</title>
		<link>http://www.gilluminate.com/2006/04/25/prevent-copy-paste-and-print-screen-online/</link>
		<comments>http://www.gilluminate.com/2006/04/25/prevent-copy-paste-and-print-screen-online/#comments</comments>
		<pubDate>Tue, 25 Apr 2006 12:33:00 +0000</pubDate>
		<dc:creator>Jason Gill</dc:creator>
				<category><![CDATA[Developer Blog]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.gillumiante.com/2006/04/25/prevent-copy-paste-and-print-screen-online</guid>
		<description><![CDATA[NOTE: This script is no longer supported in Flash Player 10. (It was fun while it lasted!) Let&#8217;s face it, there is such a thing as sensitive material on the web. I was recently put to the task of protecting a certain page on our company&#8217;s intranet from being redistributed outside the company. In other [...]]]></description>
			<content:encoded><![CDATA[<div style="border: 1px solid #333333;padding: 3px;width: 375px;text-align: center">
<h3 style="font-size: 14pt;color: red;margin-bottom: 0px;padding-bottom: 0px">NOTE: This script is no longer supported in Flash Player 10.</h3>
<p style="margin-top: 0px;padding-top: 0px">(It was fun while it lasted!)</p>
</div>
<p>Let&#8217;s face it, there is such a thing as sensitive material on the web. I was recently put to the task of protecting a certain page on our company&#8217;s intranet from being redistributed outside the company. In other words, we have a page on the intranet that is so sensitive, upper managment doesn&#8217;t want our employees to be capable of sending it to anyone outside the company.</p>
<p>So, I started thinking, what are the ways an average, non-techie employee, could reproduce this information? Since it&#8217;s on our password/firewall protected intranet, the risk of someone just emailing the link isn&#8217;t an issue. Of course the obvious is that they could copy and paste the text into an email and send it that way. They could also press the <em>Print Screen</em> button and paste a snapshot of the page as an email attachment or whatever.</p>
<p>I decided that beyond more &#8220;advanced&#8221; measures (like <em>view source</em> then <em>save as</em>), the clipboard was the method most people know how to use. So, the question became &#8220;how to disable the clipboard?&#8221;</p>
<p>I started tinkering around with <a href="http://www.htmlgoodies.com/beyond/javascript/article.php/3458851">JavaScript</a> <a href="http://www.geekpedia.com/tutorial126_Clipboard-cut-copy-and-paste-with-JavaScript.html">solutions</a>, attempting to intercept any ctrl+c or PrintScreen commands and over-ride them with a call to write a message to the clipboard: &#8220;You&#8217;re fired! Pack your things and go home.&#8221; which would in turn be pasted into their email if they attempted it. But this was klugy at best. First, JavaScript really needs a form field to have focus in order to fire an onClick type event. I figured the best way around that was to run as an onBlur and onFocus in the &lt;body&gt; tag and just over-ride the clipboard whether they tried to copy or not. This seemed to be a great solution until I realized that for some unknown reason, when you select text and then blur (remove focus) a browser window, it doesn&#8217;t actually fire any onBlur commands. Not only that, but it&#8217;s <a href="http://www.mozilla.org/xpfe/xptoolkit/introClipDD.html">a big mess</a> to add anything to the clipboard with Firefox (IE makes it really, really <a href="http://msdn.microsoft.com/en-us/library/ms535220%28VS.85%29.aspx">easy</a>). I suppose that Firefox doesn&#8217;t make writing to the clipboard easy due to security issues, and I&#8217;m not going to complain about any attempt to make my <a href="http://www.spreadfirefox.com/?q=affiliates&amp;id=18286&amp;t=75">favorite browser</a> more secure.  ;)</p>
<p>Then I remembered an Adobe Flash (that still sounds weird, doesn&#8217;t it?) application that I worked on a few years ago that used Flash&#8217;s built in clipboard functions. Booya! I cranked up Flash and wrote the following simple and very easy actionscript in the first line of the first frame:</p>
<p class="box">this.onEnterFrame = function(){<br />
System.setClipboard(&#8220;As long as this page is open your copy/paste functionality has been disabled.&#8221;);<br />
}</p>
<p class="box"><em>(Added 08/28/2007: for the new <strong>CS3</strong> use:)</em></p>
<p>addEventListener(Event.ENTER_FRAME, onEnterFrame);<br />
function onEnterFrame(E){</p>
<p>System.setClipboard(&#8220;As long as this page is open your copy/paste functionality has been disabled.&#8221;);<br />
}</p>
<p>I then set the movie size to 1px wide and 1px high and published. I then placed the Flash somewhere on the sensitive document.</p>
<p>Since I left my movie at the default 12 frames per second, the text &#8220;As long as this page is open your copy/paste functionality has been disabled.&#8221; will be set on the clipboard 12 times per second. Go ahead, try to beat that time with ctrl+c and then ctrl+v!</p>
<p>As invasive as this method is, it works. As long as that page is open <em>even in the background</em>, it will prevent any copying and pasting and even Print Screen and paste. The only problem is, that it requires Flash v6 or higher, which is required in my company to use many of our Flash based applications. But just in case, I left the following IE only code as a backup:</p>
<p class="box">&lt;body onBlur=&#8217;window.clipboardData.setData(&#8220;Text&#8221;, &#8220;As long as this page is open your copy/paste functionality has been disabled.&#8221;);&#8217;&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gilluminate.com/2006/04/25/prevent-copy-paste-and-print-screen-online/feed/</wfw:commentRss>
		<slash:comments>57</slash:comments>
		</item>
	</channel>
</rss>

