Showing posts with label Cross-Browsr. Show all posts
Showing posts with label Cross-Browsr. Show all posts

Wednesday, November 07, 2007

Why Mess with Photoshop: Rounded Corners Auto Generator

http://www.allcrunchy.com/ has a pretty cool auto generator for creating rounded corner divs. You have to download an image and paste some css and javascript on your page, but all and all this is pretty cool.

Check it out [HERE].

Saturday, August 18, 2007

Image Detection, JavaScript, Safari and InnerHTML

Another cross-browser DOM tip. Safari (at least versions =< 3.x) can't handle innerHTML operations until the page has loaded.

Another tip. I ran into a situation where I had to verify that an image existed remotely. Apparently the image tag supports the "onerror" method, so if the image doesn't load you can point your onerror to a javascript function to do something about the image not being available. Example <img onerror="myfunc();" src="some source" /> onerror must be lower case else earlier versions of IE won't pick it up.

Wednesday, August 01, 2007

Funky Firefox

I noticed some strange behavior in Firefox. If you do a standard HTML select box, and set one of the options programmatically to selected on the server side before the select box is rendered (say with ASP or PHP) Firefox sometimes will ignore your select. If you copy the output code and create a standard HTML file out of it, the proper select option will then be selected. Weird.

The workaround is to set the option to <option value="myval" selected="true">some text</option>

Strange. Hope this helps someone out.

[Update] use checked="checked" for radio buttons (same problem)