Archive for March 2008

eBay Vendor Review: asendtek

User Name: asendtek
Product Purchased: HP COMPAQ AMBERINEM-GL6E ASUS A8AE-LE MOTHERBOARD (230162628898)

Product As Advertised: Yes
Shipped Quickly: Yes
Customer Service: Great

Let me start off by saying that this mobo is a hunk of crap; Asus should be ashamed of itself for putting out this junk. But hey, it’s made for a $400 Compaq computer, so I guess it only follows that the mobo is garbage; and in all honesty, if I could get a huge contract turning out substandard OEM mobos on the cheap, I suppose I’d do it, too.

That said, when my sister’s PC blew its mobo, I knew the one place I could find one quick was eBay. And sure enough, I found this vendor liquidating them. (Actually, I had found the same mobo, available through another vendor, a week earlier, selling for about $30 less; but my sister wanted to delay, so she wound up having to pay more.)

In any event, I placed the order late Tuesday; it was shipped Wednesday (for only $10; I’ve paid twice as much in shipping to other eBay vendors for parts that weighed half as much) and I received it Monday.

All around, another great transaction. Lately I’ve been having luck with Power Sellers who have uncommonly good customer service, and I can add asendtek to that list.

Editing Text On Click With JavaScript / DOM

Recently asked in Yahoo! Answers:

Clickable text to edit? Javascript?
So I saw somewhere on this website that they had rows of DYNAMIC data that when you clicked on the actual text (onfocus), the text would turn into a editable text field containing the text, and then when you clicked off of it (onblur?), AJAX was used to update the database that the data came from with that new changed value. I believe it was used to edit categories on the fly.

How do I do this? I can figure out the AJAX/PHP/Mysql part, but I really suck at javascript. I just need to be able to have some text turn into a text field when clicked that contains that text for editing. I’m sure you understand.

Thanks so much.

This is actually pretty straightforward. Basically, you do it with two DIVs: one contains the text you want to make editable, the other contains a textarea that will edit the text. Clicking on the text DIV makes the edit DIV visible; submitting the edits changes the text and hides the edit form.

But, like all things that seem simple, there are a couple of small adjustments we need to make to ensure our solution both works as intended and is safe from HTML injection.

Let’s get to it. As always, a working demo / code you can download appears at the end of this entry.

Continue reading ‘Editing Text On Click With JavaScript / DOM’ »