After some researching, I’ve extended the Form.Element.Methods with a copyToClipboard method. An example of usage: $('myinput').copyToClipboard();.
A few quick notes about the clipboard and browsers.
Natively in IE5+, you can gain access to the clipboard via the window.clipboardData object. If you wanted to gain access to the clipboard in Firefox, you have to enable security preferences in your user preferences. I couldn’t find a native solution for Opera or Safari. As a result of Firefox, Opera and Safari not having direct access to the clipboard, Flash presents us with an opportunity to gain access.
Read more on Extending Prototype – Copy to Clipboard…
A question came up in #prototype today, “How can I observe a state change (checked – on/not-checked – off) on a checkbox when the state is changed by the user (mouse click) or programmatically?”. Simple right? Just observe the change event on the checkbox and that should fire every time the value property changes. Only if it was that simple!
Read more on Observing a checkbox state change…
Recently, I was given a simple task to take a set of data and add a row to a Google Spreadsheet daily.
A great thing about the Zend Framework, they have a nice component called Zend_Gdata. Zend_Gdata provides you with classes that interact with Google services. Zend_Gdata_Spreadsheets specifically allows us to interact with Google Spreadsheets easily.
Read more on Zend Framework, Google Spreadsheets, and Me…
I’ve asked this same question myself, but today I am finally taking the time to write about it.
Normally, people might think “I need to find out the x,y where the user clicked and see if that’s within the area of my element”. The answer is much easier than that.
Read more on Detect when a click is “outside” of an element…
Published on
October 17, 2007 in
CSS.
Recently, I’ve been noticing a good amount of people are still using the universal selector (*) to reset the margin and padding of all elements. I must admit, I did the same thing until I read Eric Meyer’s artilce on Formal Weirdness. Eric’s article explains why you don’t want to reset every element on the page, especially form elements. Others are also expressing how the universal selector is much slower than specifying the individual elements.
Read more on CSS reset and the universal selector (*)…