javascript

Adobe Air SDK installation

adobe air
I downloaded the Adobe Air SDK so I could develop some Air applications, but once I downloaded it, I was at a loss of how to go about installing it. Adobe's instructions are missing from the package and nowhere to be found on their site. I have a PPC mac, so these instructions should work for those with that configuration. If you have an Intel mac, I am assuming this would work for that as well. It should also work for other *nix type operating systems. [read more...]

2007 foxtrot

Is it just me or is a passing year sort of depressing. When I look back on 2007 I feel sad it is over. I had a good year. It was a rough year at times, but also a defining year for me. I took a new job, the first time I changed employment in 15 years. I started exercising more. I’m less than a year away from my 10th anniversary. I have a daughter in first grade who is a whiz that constantly amazes me. I have another one who should be in school because she is so smart, but missed the cutoff date. [read more...]

Regex in javascript

I needed to create a toggle image in a menu. I decided to check the image src to see what image it was on. Regex in javascript to the rescue. Here is what I used to parse only the image name. [read more...]

var re = /([\w\/\.\\:]*\/)([\w\.]*)/;
var imgSrc = $('toc').src;
var myArray = re.exec(imgSrc);
if (myArray[2] == "toc_open.png") {
$('toc').src = "images/toc.png";
}
else {
$('toc').src = "images/toc_open.png";
} [read more...]

Setting nested DOM element attributes

I needed to set some attributes for some anchors in an iframe. I wanted them to open in the parent frame. The problem was I only wanted certain ones that were inside of certain elements. I wrote this javascript loop to find the <a> elements inside of the div with the id of "re". [read more...]


Creative Commons License
This work by www.bradrice.com is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
RSS Feed  My RSS Feed