jimboidaho — 2012-01-14T13:49:35-05:00 — #1
I Have seen this before in other apps (maybe there is a name) where there is some directions in the input text tag that is blanked out when a user enters data. I have some JS that is doing this nicely but the problem is I don't want to save the directions if the user enters nothing. I could do this on the back end but I was wondering if there was a better way?
jimboidaho — 2012-01-14T16:19:30-05:00 — #2
I found placehoder in the HTML5 spec. That works on Chrome but not on Firefox 3.6 or IE 8. Maybe that will be good enough.
system — 2012-01-17T07:14:58-05:00 — #3
Even if you use the client side verifications, you should ALWAYS have the server side check in place AS WELL... which lately for me has left me saying "then why bother with doing it client side in the first place?" -- and the only answer I seem to find is this rampant paranoia people seem to have about page loads.
jimboidaho — 2012-01-17T10:56:12-05:00 — #4
Thanks deathshadow60. I agree that all data needs to be validated on the back end. It will not be too big an issue to delete the directions before saving. Placeholder will works well but not all that useful until the rest of the browsers catch up.
stomme_poes — 2012-01-18T05:26:17-05:00 — #5
Jim: the placeholder attribute in HTML5 is indeed not supported in older browsers.
You have a label, correct? Placeholders are not meant to replace labels, but to add some extra nice instruction.
Recently I've been seeing more and more sites do something weird: the placeholder remains in the input even after I focus on the input, so I start hitting the backspace key thinking I need to remove it. Instead, they remove it once I start typing. I don't like this, because it's disorienting compared to the traditional behaviour I've been trained on (yeah, we users get trained to expect certain behaviour).
system — 2012-01-18T05:58:03-05:00 — #6
Scripters too lazy to set it onfocus instead of onchange... yeah, that annoys me too... Though honestly I'm getting sick of that cutesy effect -- just give me a useful label next to the input and skip the goofy scripted effect garbage.
stomme_poes — 2012-01-18T09:56:00-05:00 — #7
Amen. And unfortunately, while even the HTML5 spec states placeholders are not to be used in lieu of labels, that's exactly what people are using them for. Designers think labels are fugly.
system — 2012-01-18T13:18:37-05:00 — #8
system — 2012-01-18T13:20:28-05:00 — #9
Designers... You mean PSD jockeys not qualified to be designing jack ******* **** for the Internet... the people who wouldn't know usability from the hole in the Adobe DVD, think it's ok to use megabyte+ images on a page, and cannot grasp even the simplest of concepts like "not everyone has the same size screen, same size window on the same size screen, same default fonts, or even the same font renderer", right?
...and yes mods, I self censored
stomme_poes — 2012-01-18T15:40:29-05:00 — #10
Read the comments here (needs JS to get plain text, go figure). People didn't like the focus outline because it was ugly, so it was removed.