Tag Archives: javascript

php imagick round corner box with dropshadow

In this post I will show you how to create a rounded corner box with a drop shadow. First set your background color, foreground color, and the color of the drop shadow. Once you’ve set up your colors, the script will create two identical imagick objects, one for the background, and one for the foreground. […]

Yet another Prototype Colorpicker

And then there was another…..color….picker…. I have been dissatisfied with all the prototype color pickers out there, so when I found this jQuery colorpicker, I decided to port it to prototype. Yay! It has lots of options. Examples/Demo available here, download available here. This color picker allows you to not only select your color, but […]

Textarea auto re-size function….

So I had to create an auto re-size function for textareas. I looked around on the net and found a few things, but nothing really did what i wanted…. so I wrote this quick and dirty function to determine the pixel height a textarea should be based on the number of new lines and length […]

String Functions for Javascript – trim, to camel case, to dashed, and to underscore

So I was messing with a little template builder, and decided to try and dynamically read and write CSS to elements on a page. This brought up the difference between JavaScript having camel case representations of the dashed css properties. Soooooo, I had to write little string functions to convert camel case to dashed strings […]

Polar Arc Animation Using Canvas and Prototype

This is a little class I created to use Canvas to create a polar arc animation. A while ago I came across a Polar Clock using canvas and I thought it would be cool to create a randomized background using the same concepts. I would link back to the original script I based this on, […]

Wack Mac newline character in utf-8

So I had a user come to me with with an error with my WYSIWYG editor in our online website builder. He would save his content, which he had pasted from OSX’s TextEdit program, then try to apply that content to his website. I have a PHP function which escapes new lines and single quotes […]

Number Formatter for Javascript with Prototype

So i had to fix a ROI calculator on a client’s website today. Whoever added the content used some script they found that was using jQuery, which of course was totally screwed by Prototype…..soooo, I decided to convert the script to use prototype. One part of the script was using jQuery’s number format plugin. I […]

resize iframe to content height

So I was fooling with an iframed forum today and had to figure out how to make the iframe resize to the height of its content, just to keep things pretty.  This can be done rather easily with a little javascript. View Demo Step 1: Create your iframe and attach a function to the document. […]