Technology Insights

Dynamic Styles with HTML, CSS, and Javascript

Styles can be dynamically changed in 4 ways: With Javascript (overrides all other styles)el = document.getElementById(‘pageBody’); el.style.backgroundColor = ‘red’; Inline styles (override both embedded and external styles)Inline styles are styles that are written directly in the tag on the document. Inline styles affect only the tag they are applied to. <a href=”” style=”font-size:91%;”> Embedded styles…

Technology Insights

Setting up BackgrounDrb

I decided to use BackgrounDrb 0.2.1 to launch a periodic task that would run every 15 seconds.Warning: After going through the hassle of setting up BackgrounDrb, I found out that it isn’t even supported in Windows (my dev environment)! See step 8. So, these instructions haven’t been fully tested yet on a *.nix environment. Good…

Technology Insights

Ruby on Rails File Upload Plug-ins

Basically, I dug up 5 plug-ins (plugins) that can do the job 1. acts as attachment 2. attachment_fu (extension of act_as_attachment) I used Khamsouk’s tutorial (but without the AJAX) and had to change the following line from :max_size => 1.megabytes to :size => 0.megabyte..1.megabytes Mike Clark also has a good tutorial, but he doesn’t use…