January 29, 2010, 4:21 pm
Do yourself a big favor… and by ‘yourself’ I mean ‘myself’, and by favor I mean…
When you put a<button> tag on an html document. ALWAYS set the type attribute to ‘button’.
<button type=”button”>Click Me!</button>
Seems redundant, but several browsers are known to treat ALL buttons as type=’submit’. Which can be frustrating when you’ve gone to the trouble of putting a bunch of javascript in to prevent the post back if validation fails.
So basic, yet it still bites me, even after all these years.
Ref:
http://www.w3schools.com/tags/tag_button.asp
January 28, 2010, 8:31 pm
I ran across a couple interesting sites that host code snippets.
Here are some code samples:
First, Snipplr:
And here is Snipt:
Wow, they both do a nice job and it’s stupid-easy to paste their ‘embed’ scripts into the page. I’m leaning towards Snipt. Looks nice and the branding is less conspicuous.
Both of these services have WordPress plugins. But not having to mess with all that is sort of the whole point for me, so I’m not going to bother testing those out at the moment.
Features aside, I’d like to pick the one that has the strongest community. Snipplr seems to have vastly more code snippets, especially for c# and other MS technologies. The searching and tagging seems to work much better on Snipplr, too.
But I have to admit that Snipt has all but seduced me with their tasty style.
It just occurred to me that there may be a major drawback to keeping code on a separate site. Search. Hmmmmmmm. What to do.