Winternet

Getting Selected Text from a Textarea Through Javascript in Safari

Filed under: — jwinter on 7/19/2005 at 2:22 pm

Is not possible. Will update this post if shown to be incorrect.

How it’s done in IE:

document.selection.createRange().text will contain your selected text.

How it’s done in Mozilla/Firefox:

//Get the textbox through the DOM
var txta = document.getElementById(’txt’);
//this will contain your selected text
txta.value.substring(txta.selectionStart, txta.selectionEnd));

How it’s done in Safari:

Call Dave Hyatt and ask him what’s selected.

Barber Brothers Furniture

Filed under: — jwinter on 7/13/2005 at 9:51 pm

I just built a site for my friend Beau and his brother Nate who are starting a Furniture/Cabinetry business. The Barber Brothers Woodshop is open for business. Neena gave me a ton of suggestions for the colors, fonts, and layout and I used almost all of them.

It was nice to actually build a complete site, I haven’t done that in a really long time. I forgot how much tedium can really go into it. But being able to program definitely helps. This was a small site, but there were a few times when I wanted slightly different changes to groups of pages. Writing a short script to make these changes kept it quick and interesting.

0.085 || Powered by WordPress