Check Boxes and Radio Buttons Conquered by DHTML
Philip Howard writes "Pretty much every form element has been conquered by CSS so far, letting us create stylish, integrated forms to tie in closely with our site designs for that UI polish graphics artists love to have.
Radio Buttons and Check Boxes, however, have resisted most attempts to style them consistently, accessibly and elegantly- perhaps because nobody cares enough to come up with the solution.
However, these elusive form elements have finally been conquered with a simple combination of CSS and Javascript and a little HTML wrapper.
The solution is easy and quick to implement, is accessible (working with tab and space) and elegantly degrades where CSS and/or XHTML is not available."
His solution is very similar to what mine would be. I'd just walk the DOM looking for checkboxes, then replace them with some inline element creation code. His solution is to get a list of all links, then find any with a special class. He then goes on to replace the contents of the links via the innerHTML property. Clunky, but it does work.
To the author: You can achieve your goal much more easily by attaching the className to the checkbox directly. Use getElementsByTagName to get a list of INPUT tags, then loop through those. When you find one you want to replace, use the function to build the replacement tag on the fly. You can then use to swap out the tags in a hurry.
Oh, and using an anchor tag for event handling is very 1990's. Try doing something like this instead:Note that you don't actually need the "StyledCheckbox" name, because you would be passing the actual element through to the event handler.
Good luck on your work.
Javascript + Nintendo DSi = DSiCade
This is not the first time check boxes and radio buttons have been "conquered".
boo.com had quite groovy code if I remember rightly.
Suggestion to improve your version: onFocus="blur(this)"
Those are pretty nice. Makes me want to make a webpage that actually uses radio buttons just so I can implement those.
Will Lynx render them correctly with ascii-art?
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
This occupation won't stand! You may think you can apply your western styles upon us by force, but history will prove you wrong.
html as an "interface" still totally lacks some basic things... like, oh, I don't know... sliders...
Hey, here's a question-- Why do we [i]need[/i] styled checkboxes? I hear those words and I just get this mental image of style kicking contents in the nads over and over and over.
Finally, I can add stylish radio buttons and checkboxes to my sites! Wait, I'm a geek, not a graphic designer. I don't care about the style, just as long as it works ;)
not... that's rediculous, as if its some sort of invention... obviously it can be done and has been done in the past. This is NOT news.
We need to kill that crap and never use it again yet people keep using it in new applications.
Javascript is dangerous, not standardized, and crap. Find another alternative please.
[ ] This is a good idea
[ ] This is a kludge
[ ] I didn't read TFA, but I like clicking boxes anyway
This is somewhat at old idea, but appears to becoming a more mainstream idea in web development. The main focus however should be making sites that follow standards so they are viewable on every type of browser and platform.
Voice your opinion!
That's pretty damn cool! I've been waiting for this for sometime actually...
Gravity Sucks
Is it a good thing to have controls that deviate from the standard so much that they aren't even recognizable anyore, like the green/grey round toggle button that replaces the checkbox on the sample page? Why disguise standard controls so the user will have to spend some time trying to find out what the standard controls are "hidden as"?
Don't blame Durga. I voted for Centauri.
It returns 2/10.
I had fun clicking though.
If only I could style with CSS too..
Please check the box if you care if you care what it looks like.
Show this to your friends and family that don't know what a real hacker is
I can't switch focus with this DHTML-Stuff.
http://slayeroffice.com/code/custom_checkbox/
describes the same. and the author there even mentions that he took the idea off from aol webmail.
I just hope the marketing people that work in my company aren't reading Slashdot today.
Otherwise, I'll be making fancy checkboxes for the next 2 months.
Damn you, Slashdot.
I'm a big tall mofo.
Do editors not read articles any more? shit.
The examples look very nice. I still think the bigger problem is that web applications have absolutely no UI consistency between them, though. On one web site, select-boxes cause a form to be immediately submitted when a selection is made; on others, you have to click "Go." On one web site, check boxes look like boxes with check marks; on another they look like stars; on another they look like glowing orbs (not very colorblind-friendly).
This is the sort of thinking that leads to such UI atrocities as Winamp, iTunes for Windows, and Firefox for Mac OS X: all three of these ignore most of the native widget drawing capability in the name of creating a pointlessly slick, cross-OS-consistent experience.
I for one welcome the arrival of XAML and XUL: ways to describe forms that every OS will render using its own navigation and widget capabilities. It'll be as awesome as the time Java solved that problem for everyone everywhere.
For more information, click here.
What would be the next step so that in this would be used in CSS3?
granted i'm not exactly running the latest hardware, but every click on a radio button seemed to illicit a lot of blinking and flashing on the part of the other buttons. maybe it's just javascript running slowly as the DIVs move around or something, but i prefer to think of it as simple jealous from the other buttons in that group. "click me instead!" "no me!"
in any case, i'm all for flashy design, but this seems to be more trouble and more cumbersome than it's worth, unless that javascript can be optimized to not be so slow.
i could live a little longer in this prison
Not just that; there are usability standards. Checkboxes and radio/option buttons are supposed to look and act a certain way. It makes using them that much easier. Disguising them as something that looks like Lucky Charms marshmallows really fudges matters. The sample even had checkboxes made to look like option buttons (round).
Don't blame Durga. I voted for Centauri.
this is nice, but requires the mention of http://dontclick.it/
I would prefer to have normally and familiar elements that i can tab through than fancy graphics that don't work as expected.
I teach an internet technology class that focuses on CSS and JavaScript and I will be sure to include this technique in our discussions before the end of the semester.
.gif's with transparent backgrounds because they look like crap on my browser's settings. With .gif's and this technique, forms with revolutionary design are achievable.
The article's author was a bit lazy, however; he should have made his images as
I also recommend these techniques for new web designers (the source and authors of them will come as a huge "duh" to professionals, I'm sure).
Falun Dafa is good!
The author should apply for a patent for this. I'm sure it'd be approved.
There are certainly some people out there who are impressed by cool graphic tricks.
After writing web applications for ten years, though, I find that more and more people simply want to get the job done. Perhaps it's that I work in Healthcare and my customers are busy people caring for patients.
The other thing that makes me nervous about bells and whistles is that they add complexity to things. Complicated things break. Browser makers have changed how they implement CSS and DHTML before and there's a good chance they'll change it in the future. Basic support for checkboxes will last another fifty years.
its easier to create hidden variables in your form and then vary the same code that you would use for buttons to change the image while changing the value in the hidden fields. making it reverse compatible would be to put regular checks in a hidden div... so if there is javascript div is emptied.. if there is no javascript the contents of the div shows and the javascript doesnt run... cascading styles are optional...
They look horrible and confusing to me, especially in the example the author has given. If i had come across that form on a page and it said "please select a rating" or the like I would be momentarily confused.
I think there is a good reason why radio buttons and check boxes haven't been styled too much - it's because they are perfect the way they are.
If you want to style a checkbox or radio button atleast make it look like one, get some inspiration from the likes of Opera skins.
I am very glad it degrades well, but javascript is never a solution. The goal of any web developer worth his salt is to make something universally compatible, intuitive, functional, AND good looking regardless of extensions or security settings.
It's a nice hack admittedly. Heck I may even use it on personal sites.
A lot of people seem to be missing the bigger point here. It's not that he's replacing checkboxes with images, it's that he's managing to do it while keeping the page properly structured and accessible to all browsers. While the page isn't quite all the best HTML underneath (what's with the tables?), if you look at the forms, it's proper HTML and not some javascript hack that will break old browsers.
I think that's the point, anyway.
Slashdot: 24 hours behind every other site or your money back!
Is it so hard to have those css and javascript scripts in the same html file so it's easy to just use "view source" as opposed to scrambling around to three different files?
Accessibility my arse.
OR NOT.. using Mozilla... when I hit space it checks it and ALSO moves me to the next page!!! Not how it is suppose to work.
What he's doing is certainly useful, but not new. I could just as easily say that WebDDM is a solution to the age-old problem of styling menus... but people have been doing that for years. (Not that WebDDM isn't great :p)
why is this limited to polish graphics artists? ;-}
This also breakes usage by embedded non-updateable systems like the Jornada line. These browsers were developed to work with STANDARDS because they are STANDARDS.. If you write your page in CSS - standards compliant browsers will not be capable of vieing it, will it? Will you bother to keep a seperate copy of the site to the standard or will you choose to not do business with them. If your planning on saying that the standard changes so buy a new system and get up to date.. Then the standard isn't much of a standard now is it. Perhaps we should start adding a date stamp so buys are aways that the HTTP that their system is design to work with now may not work at all a month from now becuase the standard changes.
Tab works, but Space does nothing (or in Firefox (Deer Park Alpha 1), it scrolls the page down as normal). IE6 has the same problem plus the icons flicker horribly when moused over. maybe i'm missing something?
This is my Sig, this is my Gun. One is for Slashdot and one is for Fun.
This looks nice but, as many seem to forget about, the keyboard functionaility (eg: Tab then Spacebar to select) just isn't there. I have several users that still don't feel comfortable with a mouse.
WHO CARES??
I'll bet he'll have an erection for a month. His mother must be so proud.
After a couple of decades experience with developing windowing widget toolkits on multiple platforms, would it be possible for the W3C to come out with specifications for widgets, themes, etc. using SVG?
"Provided by the management for your protection."
Definetely a slow news day on Slashdot today. What will they report next? Seeing the back of your head finally possible thanks to an ingenious mirror system. Sheeesh.
This is not a degradeable, accessible solution. If I have JavaScript enabled and images switched off, what do I get? big empty spaces. Not really ideal.
[And it's the kind of thing that's been around for two or three years at least...]
It's about time! Once my son wrote "Insert Brain Here" on the back of my bald head. I was laying on the floor, spinning around for hours trying to read it before someone finally told me what it said.
Don't blame Durga. I voted for Centauri.
That's fantastic. Now only if CSS could conquer my creditors, that would be peachy.
- IP
Oooh! Pretty!
Now I can make my circle checkboxes and my square radio buttons!
Live forever, or die trying.
In Konquerer tabbing between the checkboxes works... but when you press space to check/uncheck them it tries to scroll down the page instead of checking the item....
That said... I'm sure it's a browser problem. This is some interesting work... and I just might put it to use.
Friedmud
SEPARATION IS THE FUTURE!!!
Yes using images as form elements can work. Integrating them server side is difficult.
Though my real beef: every mouse over causes a *flicker* of the image.
End users don't like "wierd" behavior in user interfaces. There is no reason that the image should disappear and re-appear when the mouse goes over the image. This behavior gets worse as the connection speed of the user decreases.
This sort of behavior makes people who are not fully comfortable with the computer uncomfortable reducing their desire to interact with an application that behaves in this manner.
The flicker bahavior has also become rampant in drop down menu and site navigation everywhere. Back in the day we used to cache images but now we just accept sub-standard UI behavior because caching images "is a pain".
My 2 cents
Netflix's UI had that for ages. Yawwwwnnn.
there's no place like ~
Using the famous Web Developer toolbar (0.9.3) on Firefox, with JavaScript enabled and Images disabled, I see nothing at all.
Which is pretty much what I would have expected, but if people start using this method on websites then I'll get mighty annoyed.
My other processor is big-endian.
The number of marketroids I've met who actually know about Javascript is vanishingly small, like maybe two whole people. The rest of them simply break it down into its component parts to figure out what it means. Since the word is a combination of both "Java" and "script", it's obviously a set of pre-rehearsed lines that, when spoken, spur your marketroid intern to action so that he/she will bring you more coffee.
If you think that's bad, let me tell you about the months I spent trying to explain to a management-type that wanted us to do absolutely everything in XML. Lucky Charms form widgets? Sure! "Can you guys do them in XML? That's the language that we should be using for all of our projects now. Thanks!" Stupid buzzwords. *shudder*
"Linux doesn't exist. Everyone knows Linux is an unlicensed version of Unix"- Kieren O'Shaughnessy
It's nice to know that at least *someone* didn't forget Poland.
Not to offend the guy, I mean it's nice to make something like this as a tutorial, but this technique has been implemented for many years. Saying that the lack of CSS coverage for radios and checks has been "conquered" by the Javascript image-swap is rather stretching it.
Glog!
My OS makes widgets look a certain way. Most software makers will either use the native widgets or try to mimic it.
STOP MAKING MY USAGE OF YOUR SOFTWARE INCONSISTENT W/ EVERYTHING ELSE!
Just tried it with Opera 8 on Linux - all the images get doubled up, and the bottom-most group of "radio buttons" only displays one (doubled) item instead of all 5. Guess it still needs some fine tuning.
Sam: "That was needlessly cryptic."
Max: "I'd be peeing my pants if I wore any!"
File input elements are the most annoying when it comes to UI style inconsistencies.
I had a failed attempt at replacing a file input element with a text input + graphic button, due to the way the default "browser" button inconsistently works across browsers and for some obvious security reasons (like silently making the browser submit an arbitrary file from the local disk). This was a while ago and I don't know if it's still impossible. Has anyone succeeded in replacing file input items with custom visual elements?
isn't this the same as what gmail uses, and that's been out for quite awhile now.
As other people mentioned the tabbing is not performing properly but in addition people need to be careful about using color for meaning. If your user is color blind they might not be able to tell if a box is checked or not. Therefor, it is not accessible.
Comment removed based on user account deletion
I feel your pain...
"Even at this moment our buttons and boxes are crushing their .'s and #'s"
__
Thou hast besquirted me, O leotarded one.
Shouldn't this be accomplished by styling form elements via some sort of CSS thingy? Isn't that why we have CSS?
--grendel drago
Laws do not persuade just because they threaten. --Seneca
We need support for input type="file"...
However, it renders fine in Firefox. Nevertheless, when it's not compadible with Internet Explorer, I'd hardly call this issue conquered.
For he today that sheds his blood with me shall be my brother.
Dropdowns are.
Problems with them being OS-driven rather than application driven elements, problems with layering them (especially with Flash), inability to properly apply styles to them, different heights/widths in different browsers/OSes, the list goes on...
As far as I can tell here, he hasn't done anything new, just plonked some wrappers around elements. It's a nice trick, but certainly one that's been used before.
There's a little flicker problem when you first use the page. I haven't debugged it or looked at it for more than a few minutes, but it's probably fixable by pre-loading the images so that when you first access them it doesn't have to get them from the server.
I suppose the real question is are they still accessable? can you use label and group tags like you can with normal input tags? BTW, you can style firefox form elements moderately well if you remove an !important that some idiot put in firefox's css for form elements,
input type="file" is intentionally that way. Think about what someone malicious could do if they could implement their own file browser and have it run *on someone else's machine*.
You, sir, are my new hero.
Congratulations.
Though, I may note that sysadmins have been using this philosophy for quite some time - in the form of LART.
It'd have been much more impressive if he had done this without any browser checks. It's hard, but frequently it can be done. I recently hacked together the Game of Life using Javascript and CSS and no browser detection tricks. It works on Mozilla, IE, Safari, and Opera (the latest versions, anyway). I just wish it wasn't so slow. Ah well. Ya win some, ya lose some...
Hexy - a strategy game for iPhone/iPod Touch
- Managing a shopping cart with thumbnails of the actual items rather than names
- Being able to control selection of paragraphs or words in an editing application (think Gmail spell checker?)
- Manipulating rich HTML elements like IFRAMEs for who-knows-what-killer-app
What I really like about the approach is that from a developer perspective (eg: PHP form parser), I can pretend that it's just a regular web form, while my user may perceive it as much friendlier and more fun.* If you're going to be a degenerate, maybe you should just use Flash like the rest of your kind.
One of the most fundamental concepts of good UI/GUI design is that you DON'T INTRODUCE NEW THINGS.
Everytime you introduce something new the user has to learn how to use it or what the fuck it is. This is bad. Really bad. You just won't believe how vastly, staggeringly, jaw-droppingly bad it is.
It may seem incredibly anal, stale and anti-progressive but that's the whole point. There's no such thing as an innovative interface because innovation has connotations of something both new and better. In the realm of Human Computer Interaction (HCI) new and better are mutually exclusive. Good UIs are simple, intuitive and introduce absolutely nothing new. Ever.
There are only two truly intuitive interfaces in existance. The nipple and the vagina. The rest you have to learn how to use.
Save the styled checkboxes and radio buttons for other people in your yuppie coffee house. Your average user doesn't want them, won't understand them, won't appreciate them and doesn't care what they look like.
Question everything
Moble devices have such a varied degree of fidelity to even the most basic HTML that all beautification is a waste of time (unless, of course, you have a specific device in mind). This also stands for Text-To-Speech. You're better off having plain HTML for these scenarios. Case in point, his solution doesn't render on my phone at all.
Why?
Because my phone gets really confused by CSS, except for a very small subset that the vendor chose to support so they could prettify their website.
Web developers wish this was true, but the sad story is that it's not. There are lots of people with broken or partial implementations of CSS, to which approaches like this are actually more destructive.
Quite frankly, Javascript has better downgrade characteristics than CSS, which is sad because CSS is a wonderful standard. But people tend to feel gung ho about implementing parts of CSS, but back off from Javascript.
Slashdot. It's Not For Common Sense
I've worked with the web html/scripting/javascript/dhml for years now; i'm by no means a standards nazi, but I do recognize the need for them; and as time goes on I go more in that direction. However, in spite of this I still get seduced by these types JavaScript dhtml 'pretty' applications. Even after all these years of spending so much time working on this sort of thing and then having to abandon it because
a.) it doesn't work cross browser platform;
b.) it confuses users who are ultimately more interested in function and not form. In fact this type of application actually creates more function problems in the sense that it takes away features that users like with form (tabbing though them for instance).
the best measure for this type of thing is really does the javascript/dhtml widget add functionally or take it away? (this is especially true for form elements) - if it improves appearance all the better. This example degrades usability.
I just fucking hate it when you retards refer to a Javascript source file or code fragment as "a javascript". The word Javascript refers to a fucking programming language. Do you say, "I solved my physics problem with a FORTRAN," or, "Let's rig up a demo interface with a Visual BASIC?" No, you don't, unless you're an idiot. Well, then for fuck's sake stop saying, "a javascript!!!!"
But it can never be said enough.
If Javascript is part of the answer then keep looking for a real solution.
The use of Javascript is almost universally unacceptable as a solution. It is completely unacceptable for something like a form input. It is marginally acceptable only for purely frilly decorative purposes that have zero functional effect on a website.
Similar examples are IE's proprietary scroll bar stylings, and the fact that you can't style form elements in Safari. There's a reason why changing your scrollbar color or styling your submit buttons is bad.
As stupid as it may sound, things such as scrollbars, buttons, input boxes, etc, should remain the same across all appplications on the system. The checkboxes in my browser should be the same as the checkboxes in my spreadsheet editor.
Doesn't look too pretty without that most basic of attributes - the background colour...
Amazon.com's developers must have read this post, stolen the idea, built a time machine, and went back in time and implemented it, becuase they've done the very same thing with the "Rate this" check boxes on their site. Whoa.
I hope Amazon hasn't patented time travel too.
Your comments are good, but assuming no one browses from PDA's is like saying no one plays PS on a PSP... If anything, more people will be surfing from these type of devices, not less.
I've been using an HP iPAQ (yea I know they're out of style) with MS Pocket PC. It's a blast to surf on this thing.
Not only does the BBC and MSNBC support this format, they are many other sites as well.
Here is a good site:
PPCVidz
We play the game with the bravery of being out of range
"One of the most fundamental concepts of good UI/GUI design is that you DON'T INTRODUCE NEW THINGS."
Damn! Well there goes my ZUI.
There's a hidden check box in this post, solid white, when you click it, it turns solid white! If you get it, and you find the white button with white text, you win my money!
Seriously tho, I hope this doesn't become too widespread, I hate searching around websites for the options I need to select, I just want to click and go, not figure out what the designer was trying to accomplish.
This is all fine, and it's no news, i thought of doing this some time ago, but didn't really want to spend any time doing it as it just causes more confusion and slower page-rendering with little or no better user-experience.
:/ it's a horrible element that is impossible to style since it's really 2 elements in 1 - a browse button and a text field with the path.
What we need is a better file-form element
I am not familiar with any other way to make file-elements with a possible way of styling them. And it seems every browser renders the element quite different which is a pain.
pretty much every form element has been conquered by CSS so far, letting us create stylish, integrated forms to tie in closely with our site designs for that UI polish graphics artists love to have.
Ummm, hello, welcome to slashdot. graphics artists? no where to be found.
The "Insert Quote Here" line is almost as predictable as inserting an actual quote.
Oh /. my /.. How out of touch have you become? This is not new. People have been doing this or similar Javascript\checkbox hacks for some time.
Standard checkboxes and radio buttons are generally fairly small - doing a lot of form input (ex. surveys) can be really aggravating. This is a good way to get larger sized inputs - especially for mouse challenged people.
I think he released a bit too soon. His technique doesn't respect disabled=true attribute.
I'm still holding out for Quantum Checkboxes. Let me know when somebody comes up with one that fully supports "maybe" and we'll talk.
Money I owe, money-iy-ay
This is hardly new. I first picked up the technique of plopping down two images and styling one of them to invisibility to simulate radio buttons and check boxes something like four years ago. When I had to make a DHTML application for work, I got them right on the first try.
If this is a big enough deal to hit the slashdot front page, perhaps someone could list the other things that are supposedly hard? This one took me ten minutes; maybe I can solve some others, and get some front page traffic of my own.
StoneCypher is Full of BS
Graphics can be used to show pictures of a gentleman spreading his anus to an unnatural size. Ban all images on web sites!
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
Even though this is a nice solution, the problem is that most users have been used to the fugly styles of radio buttons and check boxes for so long, that most users won't know that these new styles are clickable (they will think they are just static images).
That differs from a standard windowing UI application where the user subconciously knows what is clickable and what isn't. With the browser we have become so ingrained to knowing that "such and such is a picture, it does nothing when you click on it" that I'm afriad it's too late to use this technique with any effect.
I haven't seen this done anywhere, but you can add your own attributes to tags:
<input type="radio" subtype="skin1"/>
You access it by grabbing the element (via JavaScript/DOM):
x = (the element)
a = x.getAttribute("subtype");
if (a == 'skin1') {
(do something)
}
The syntax might be slightly off (getAttribute might return an object that you have to
<input type="text" validate="integer"/>
<input type="text" validate="customer_id"/>
Wer mit Ungeheuern kämpft, mag zusehn, dass er nicht dabei zum Ungeheuer wird. --Nietzsche
Neither the radio buttons or checkboxes rendered *at all* with Firefox-1.0.4 on Linux. I made sure JavaScript was enabled, and that I wasn't blocking images from other than the originating Web site (which I usually am). There are a few extensions installed: Flashblocker, Download Manager Tweak, etc. Probably, they would all be considered very mainstream by most Slashdot users.
So, yes, there can be rendering issues with Firefox as well.
It is so sad to see this kind of diffusion of UI styles that this, and every program like Winamp etc. offers with new "skins". I want to just use my computer, not hunt for the UI elements. "Oh, the clown's nose is a checkbox, and his shoes are radio buttons! AWESOME USER INTERFACE DESIGN MAN! THIS IS SO INTUITIVE! I CAN'T WAIT FOR THE NEW GARDEN GNOME INTERFACE!"
Doesn't anyone remember back when the Mac and Windows came out, how it was fantastic that we had a CONSISTENT user interface? How we didn't need to learn yet another persons crazy GUI scheme? How developers didn't need to hack up custom UI designs using graphics primitives but instead could call simple SDK calls?
And think of HTML. Why in the WORLD would I want to install all that "stuff" when I can just say...
There is a way to do this, although it's a bit of a hack. Basically you make a separate text element, and an image for a button. You make your actual file control invisible (using opacity of 0 in all its different variants, NOT using visibility or display) and position it using CSS so that the button is over the image (it helps to use a 50% opacity for this step). Then you put javascript in the onchange event of the file box that updates the other text field so the user can see that they've selected a file (although the other text field doesn't have to post back to the server).
Can't change font size (whaddya mean you can't see my 6 point fonts, what are you, blind?)
about his tiny, unchangable fonts. I was nice about it, too. His reply? "Get some glasses, grandpa!"
Fuck him AND his stupid shite site. The dumbass.
I'm tired of just ignoring and tolerating stupidity and ineptitude and excuses. It has to stop.
Then quit voting Republican!
Wow, I completely disagree. Allowing customization and personal details to be used on the internet is a step forward, not backward. If you want a consistant interface, use linux with lynx, and it'll always be 'x' pt. with tabbable links. It's not pretty but it's consistant. Oh wait, you WANT it to look nice... that's right, that's what GUIs are for. If you don't like the garden gnome interface, protest by NOT visiting that site. If you really like the site that much, you'll get over the interface issues. *shrug*
Why is it that if I submit in Plain Old Text, the html tags still get interpreted?
I meant to ask if emphasis in TeX/LaTeX worked the same as in XHTML.
Has anyone filed a patent for this new technology yet? How about the book and movie rights? Are they still available?
Other comments have pointed out that these 'styled' controls break consistency.
They have other problems:
- don't work with keyboard input
- accept clicks anywhere in their region rather than just the control itself
- a click-drag should leave the control in it's current state and perform no other action. On my browser (safari) a click-drag initiates an image drag
- don't work properly with the accessibility features of the OS (for vision impaired: voice over, sticky mouse, etc.)
Application developers - whether web or desktop - should always use native controls or you *will* be disrupting the user experience of at least some of your users (the accessibility problem is a biggy).
Ew. You weren't kidding about it being a hack. It's a clever hack, but it's kind of scary. :P
His primary concern (and what he believes he's invented) is a method to be backward compatible with browers that have JavaScript turned off, and/or browsers that lack CSS support. (You actually want to support those guys?)
I certainly want to support those who have javascript turned off. If Mozilla were to allow me to turn off javascript for specific websites I'd do it in a heartbeat. Actually my firewall allows me to do this however for whatever reason it doesn't work with Netscape above 4.7 or with Mozilla derived browsers such as Firefox though it does with IE.
FalconShould there be a Law?
This is the reason I leave javascript off for most sites. The thing behaves better with it off.. The cute little stars for radio boxes are really really annoying.
- There are excessive elements! Ideally, the script should work with exactly what is given, and not require extra code to be added.
- There are onLoad JavaScript calls in the <body> tag. These should be added automatically by the external script.
The example is similar in philosophy to Unobtrusive JavaScript, where the point of the game is that the HTML should be written as if for a non-JavaScript browser, and all JavaScript effects should be added appropriately by an externally included file. That way, the page will have a very good chance of being accessible, as well as technically modern and something to be proud of.Web developers only need to cater to those devices in which they expect their content to be viewed. I do not expect, nor do I desire for someone to use my company's web apps from a cellphone or PDA.
You understand don't you that the web is supposed to be accessibly to all? It may be "fine" if a website is for the internal use of an organization that controls how those there accesses the site, but it definitely isn't good if the site is public to use nonstandards.
FalconShould there be a Law?
In all cases these can be done without requiring users to enable JavaScript. So why do site developers do this? Is it incompetence, laziness, a lack of knowledge or what?
This is my biggest problem with flash.
There is nothing more annoying than browsing to a site from a machine which doesn't have flash installed (don't want it) and realizing the site was written in such a way as to not be able to get past the into animation without flash.
People who make web-sites which can't be operated without flash need beatings.
As a flash developer who does exactly what you are complaining about I can honestly say that neither I, nor the clients I do the flash for are interested in serving people such as yourself who just don't want to upgrade because of some lame ass excuse....go away...find someone else still using outdated crap and go with them...we'll be fine thanks!!
This is old news, I completed this about 4 months ago... an in a more accessible form as I use LABELs as the styling object, which means it degrades gracefully.
h eckbox-customisation/
http://www.flog.co.nz/2005/04/27/arc-adams-radioc
Not only that, at the same time I published my method somebody else posted almost the same thing on their blog.
You're behind the times slashdot.
And would be totally unnecessary if IE was capable of applying CSS to these inputs. Put a border on either, and you get an ugly square drawn around it. Styling inputs would also be infinitely easier if IE supported attribute selectors:
input[type=radio] {height: 1em;
width: 1em;
background-image: url(gray_star.png);
border: 0;
}
input[type=radio][checked] {
height: 1em;
width: 1em;
background-image: url(yellow_star.png);
border: 0;
}
No javascript, no accessibility issues, just the user's annoyance at having to recognize these inputs.
Viva la browsers that don't suck!
You can also script "ipod style" rotating dials in javascript.
Scripting images to work like form elements is so not impressive by anyone's definition.
If only you could mod an entire article Retarded
------ The best brain training is now totally free : )
We're all excited that someone has figured out how to "more easily" replicate a user interface element that has been a standard part of user interfaces since 1995? Replace "Internet" with "Mainframe" Replace "Browser" with "3270 Green Screen" Replace "HTML/DHTML/XHTML/CSS/etc..." with "Terminal emulation protocol" I'm currently typing this message into a box that covers about 1/10th of my total screen real estate and a scrollbar just appeared. I have to type 7 extra keystrokes to emphasize bold text. When are we going to grow up and stop reinventing complexity and start building systems for user interfaces that are truly useful?? I'm off to preview this post to make sure it looks right before I press the submit button. /blech
Terry
Disregard for standards and a narrow focus on your current and intended audience got us Progidy and Compuserve. Focusing on standards, and leaving open the places and ways in which content are delivered got us the Internet and the Web.
The indicator "lights" next to each question also probably looks like some kind of control to most users and it "lights up" when you answer correctly and turns red when it's wrong. Again, it's all managed in the code.
--Rick "If it isn't broken, take it apart and find out why."
You know, if the styling used is such that it suits the task or is consistent with an existing convention (say, using stars as a quality rating in a review), it could actually enhance usability.
I got a great idea, let's release a first person shooter game, and instead of WASD as the move keys, we're going to use FBLR! FBLR! Front, Back, Left, Right! It makes so much sense doesn't it? It's really intuitive isn't it?
So do stars for a rating, but unless you put a text message that says "Click the stars" nobody will click them - they will just assume they are images for decoration or existing rating.
Any toilet paper with
"Now wipe your arse"
printed on it?
Actually, quite a few places use stars for ratings and it seems to work pretty well. Amazon does this particularly well on some of their product list pages, for example; hover over the stars and as you move the mouse it lets you know what each rating means. Click a star and it submits your rating.
So... want to pull any more wild assertions out of your ass?
The moment you add any text after the checkbox, boom. No longer works.
I'm not familiar (motivated) enough with javascript to fix it, but some basic experimentation shows these scripts to only work with unlabelled checkboxes or radio buttons.
Please test your code more thoroughly next time.
I'm noticing that in practice your script doesn't work outside of the example.
I got quite excited when I read your page and tried your code out immediately, but it appears that adding any sort of text after the checkbox or radio button breaks it. And you can't have checkboxes without some sort of label.
It was probably worth testing your scripts before releasing them to slashdot, but don't give up now. For my excitement's sake at least, please fix this and post an update on your page.
The moment you add any text after the checkbox, boom. No longer works.
His scheme replaces the entire checkbox area. If you want to add text, it must be outside the SPAN area.
This version avoids the issue all together, but it isn't complete. You need to add a hidden field to store the value in.
Javascript + Nintendo DSi = DSiCade
We still don't have semi-standard editable grid and collapsable tree/outline widgets, and you guys are fussing about pretty borders around checkboxes? Pardon me for my outburst, but you are a bunch of fucken girlie men!
Let's resolve the practical issues first, and THEN focus on pretty frilly borders.
Table-ized A.I.
I, as a user, expect the web apps I use to be usable from any web browser available to me, including cellphones and PDAs.
You really do that? Wow. My hat's off to you. Though personally I much rather do less painful things, such as piercing my tongue with hot nails.
In Firefox if you hold down Ctrl while clicking these checkboxes, the article page is reopened in a new tab. This doesn't happen with a normal checkbox.
"Now, there's an easy way to make text bold on a webpage. Just enclose it with ! It's also backwards-compatible, showing normal text on browsers (such as Lynx) that don't support bold text." Why is this a Slashdot article? Hasn't anyone heard of webfx.eae.net?
IMHO web devellopement is a very specific kind of devellopement. And while respecting standard is important, pragmatism is far more important.
Choosing a target as specific as possible (e.g. Mozilla + IE) and define precise design practices is the only practical choice if you don't wanna end up in CHAOS.
You need to be very very pragmatic and do everything as simply as possible. Great revolutionnary designs, Design patterns for every problems, extreme modularity, and cutting the codes in many many very small practical functions may often end up being impractical with a web project and make it a hell of a job to be maintained.
And overall, in any languages, complexity is never welcome in the code source. All the job consist precisely in making a clever design allowing to make very complex stuffs in very simple and easy steps.
Of course it's only my sujective and personnal point of view. But having to maintain websites where the libraries implement or rename nearly every PHP functions, where it takes up to 2 hours to find the actual code that's causing an error. I'm sick of complexity. Especially when it's not needed.
Every fourth sheet. Followed immediately by "Grasp firmly here" (for the benefit of the next participant)
The world according to SComps
is styled [Browse...] buttons, without the aid of JavaScript. They are not stylable and make any form that you put them in look out of place when the page is style with CSS.
FORMSTYLE UPDATED
I have updated the script based on some of your concerns, suggestions and whinings. Thanks for your input!
The new FormStyle is available for download here.
Gadgetoid.com - Gadgets & Games Journalism
Don't use it! It is not accessible. The buttons do not appear in Mozilla 1.7.3 when colors are disabled. (And no, I won't enable colors in my browser.)