View Full Version : Drop down menu (form) & Scrolling
Chantal
07-12-2004, 07:08 PM
When you create a drop down menu with options that go to a anchor link on the same page... In IE you stay inside the drop down (form) box so when you try to scroll you scroll through all the anchors which is highly anoying.
Netscape and Opera (Although crappy) don't have this by default and instead just let you continue scrolling the normal way. Is there a way so that the box selection is canceled (for IE) to achieve the same effect as in Netscape and Opera?
document.body.focus() to set (scroll) focus on the body
Chantal
07-12-2004, 09:03 PM
Uhm could you explain it a little more please? :o
in your <select> tag put this:
<select onchange="document.body.focus();">
Chantal
07-19-2004, 06:10 PM
I already have:
onchange="if(options[selectedIndex].value){location = options[selectedIndex].value}"
Aplied to the select tag. How do I add multiple commands to one? :confused:
RysChwith
07-20-2004, 07:59 AM
Easiest way is to put the whole thing into a function.
function scrollBox( getVal )
{
location = getVal;
document.body.focus();
}
<select onchange = "scrollBox( options[selectedIndex].value )">
Rys
Chantal
07-22-2004, 10:07 PM
Thanks a lot, got it working.
One more thing: Should I place the script tags in the body or head? :o
fredmv
07-22-2004, 10:39 PM
That's an inaccessible approach. What about those without graphical browsers? What about those without JavaScript? Use an unordered list of links. Not only easier, but far more accessible (as well as several other benefits). Please get your facts straight before aimlessly assuming things. To call Mozilla and Opera "crappy" is beyond wrong. And you say it like IE is somehow better. Newsflash: that's completely incorrect. IE is insecure, buggy, non-standard, and slow. I don't feel like clogging this thread with anymore reasons why IE sucks, but you might consider: Internet Explorer Considered Harmful (http://ashitaka-san.home.comcast.net/yayrant/ieharmful.html) or Time to Dump Internet Explorer (http://www.securityfocus.com/columnists/249).
Chantal
07-22-2004, 11:06 PM
What about those without graphical browsers?
Are you serious? This is like what..? 0.5% of total internet traffic? My site works in all resolutions perfectly except 640... Am I now committing a crime? Sorry but I couldn’t care less about such a small group that is too lazy to update their software.
If they don’t have Javascript the whole tags simply get ignored right? In that case it’s no problem either. My ‘problem’ was a very small one and only for convenience sake.
I’m not going into discussion with some kind of techno hippy that probably has linux, a mac and other non standard soft/hard-ware just to be different for the sole purpose to be different. IE may be slightly less secure but calling it non-standard? Rofl.. lol?
I don’t think I should be the one getting facts straight buddy. But thanks for the lecture anyway.
fredmv
07-22-2004, 11:36 PM
Originally posted by Chantal
Sorry but I couldn’t care less about such a small group that is too lazy to update their software.Not to sound rude, but I don't think you understand the Web. The Web is about accessibility, and this is clearly an inaccessible approach on several accounts. Oh, and in regards to your "too lazy to update their software" remark, that isn't always the case. What about disabled persons that do not have access to graphical browsers? What about people using operating systems that only have text-based browsers? You need to think about these things before aimlessly assuming.
Further, the JavaScript dependency is an absolutely atrocious idea and explicitly violates the W3C's WCAG 1.0 section 6.3:From <http://www.w3.org/TR/WAI-WEBCONTENT-TECHS/#tech-scripts>:
Ensure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported. If this is not possible, provide equivalent information on an alternative accessible page.
A lot of legal trouble is involved in some cases if you fail to create an accessible page, as well.Originally posted by Chantal
If they don’t have Javascript the whole tags simply get ignored right?That's wrong. Non-JavaScript users will get a select element that does absolutely nothing for them. Should you have used a simple unordered list and some links, the page would be accessible in basically any user agent.Originally posted by Chantal
I’m not going into discussion with some kind of techno hippy that probably has linux, a mac and other non standard soft/hard-ware just to be different for the sole purpose to be different.That's fine. Just don't provide misleading information. Oh, and it's usually not to be "different". Linux is a better OS than Windows. Remember, some people care about this thing called security (among several other benefits of the operating system).Originally posted by Chantal
IE may be slightly less secure but calling it non-standard? Rofl.. lol?Again not to sound rude, but how long have you been developing for the Web? Most experienced developers would think you were kidding with a statement such as that. IE is by far the most buggy and non-standard browser when it comes to supporting Web standards. If you want a few examples, IE to this day fails to implement: No support for attribute selectors (Windows/Mac)
Incomplete support for PNG (Windows)
No support for the W3C event model (Windows/Mac)
No support for adjacent selectors (Windows)
No support for border-spacing (Windows/Mac)
No support for position: fixed (Windows)The above list is from the WaSP (http://www.webstandards.org/opinion/). However, there are quite a few more: Buggy CSS interpereter; can't scale fixed font sizes Buggy JavaScript interpreter; pollutes the global namespace with any element given an id or name attribute. Non-standard DOM; document.all, etc.I think that's enough for now, but I assure you there are even more things IE fails to implement, or implements incorrectly. In fact, IE doesn't even implement HTTP/1.1 correctly — it guesses the Content-Type of every file it loads. Now, can you please explain to me how all of this isn't non-standard?Originally posted by Chantal
I don’t think I should be the one getting facts straight buddy. But thanks for the lecture anyway.I think you do. As for the lecture, no problem. I don't like seeing people getting mislead.
Chantal
07-23-2004, 11:06 AM
I don’t think you understand my problem when I started this thread. It is VERY small. I just wanted to prevent that people kept scrolling in the drop down menu (form).
Sure I could make an simple list of links. But it will be ten times more ugly and for what? So 1% can view it better instead of 99% having better graphics?
As Bill Cosby once said: “I don't know the key to success, but the key to failure is trying to please
everybody.“
And if you try to convince me IE sucks don’t bring up arguments like “no border-spacing support”. I mean, who cares?
With standard I meant that a vast majority uses IE. Therefore I design my webpage *first* for IE and then fix any possible ‘bugs’ for other browsers (refer to the quote). I do fix them all but starting out designing in Opera and trying it for IE at last is just retarded. Maybe it sucks IE has no good PNG support. But when like 75% of your traffic uses the IE browser you are just being suborn when you refuse to adapt.
Oh and by the way,
I’ve seen some statistics and they said 98% has scripts enabled. So if that was your argument for not using it... please go bother someone else.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.