PDA

View Full Version : Putting the main option of a select box without borders in the flow of the text



molendijk
12-10-2010, 12:25 PM
1) CODE TITLE:
Putting the main option of a select box without borders in the flow of the text

2) AUTHOR NAME: Arie Molendijk

3) DESCRIPTION: A script for making the main option of a select box appear like an ordinary link (underlined or not underlined) on the screen.

4) URL TO CODE:
http://www.let.rug.nl/molendyk/selectbox_part_of_text/selectbox_part_of_text.html

djr33
12-10-2010, 04:03 PM
On your demo page, selecting another item in the menu doesn't change it's value (or at least it doesn't change the displayed value).

This is cool, but it's also confusing. I see it only being relevant in very specific instances, such as perhaps a fill-in-the-blank test where there are several options for a paragraph and you submit it to check your answers.

molendijk
12-10-2010, 04:22 PM
On your demo page, selecting another item in the menu doesn't change it's value (or at least it doesn't change the displayed value).
This was done deliberately (can be modified easily), in order to make the main option of a box some kind of ordinary link. You can see it at work here (http://www.let.rug.nl/molendyk/magikeven/). Click on Toon pagina's 'Mag ik even' on top, then hit Muziek in de Romantiek, then select the second page (to the right of Intro on top), then click on the 'links' with text=hier (2 links) and dit (1 link), and choose an option.
===
Arie.

djr33
12-10-2010, 04:40 PM
Those are functional, but in a very different way from a select box. In fact, I'd say that it seems possibly incorrect to user a select box-- you're making a navigation menu, not a form. That's why I said it's confusing.
And it still doesn't solve the problem: the select menu doesn't allow you to 'select' anything. Instead, it does something with what you click, but doesn't let you change the selected option, so that you could later submit a form.

As I said this is interesting, but it's using an element for something it's not designed to do, and that may be more of a problem than a solution.


And of course the other question is what happens without JS, or on a device that doesn't handle that sort of input well (like a mobile phone), when JS is supported.

molendijk
12-10-2010, 04:47 PM
I use select boxes on that site (instead of unfolding divs or listmenus) because I want the 'items' (options) to be on top of everything else, Flash objects included.
Edit:
As a matter of fact, given the way I manipulate select boxes appearing in the middle of the text, the visitor won't even notice he is using them.
===
Arie.

djr33
12-10-2010, 05:42 PM
And that's the problem: why use an element that isn't designed for that purpose? It may solve some things, but it's using HTML in a way it isn't meant to be used. More importantly, in my opinion, it's problematic because it is confusing for people; even if it's masked well enough in a fully functioning browser, if this is displayed in a browser without full CSS or full JS, it will be very strange.

molendijk
12-10-2010, 05:58 PM
And that's the problem: why use an element that isn't designed for that purpose? It may solve some things, but it's using HTML in a way it isn't meant to be used.
I see what you mean, but I don't quite agree. The ul-tag and li-tag weren't ment to be at the service of navigation menus, but almost everybody uses them in list menus nowadays.


More importantly, in my opinion, it's problematic because it is confusing for people; even if it's masked well enough in a fully functioning browser, if this is displayed in a browser without full CSS or full JS, it will be very strange.
True. But I know that the vast majority of users have JS enabled while using modern browsers.
In theory, you're right, though.
===
Arie.

djr33
12-11-2010, 01:16 AM
Yeah, that said, I think it's cool. Not sure when/if I'd need it, but it's good to have it available.

tomagig
01-10-2011, 12:21 AM
Nifty.