I am wanting to know if any other developer has done the following, and if so, was there any consequences with I.E. or Netscape.
Use a link with a ‘reference’ without specifying the reference anchor anywhere so that it can just be utilized to call a JavaScript function:
<a href=”#GoNowhere” OnClick=”LoadMore()”>
As most of you know just using the ‘#’ will shift the page to the top, while placing the reference on the link itself will shift the page so the link is at the top of the page. Performing the action without the reference anchor seems to work without shifting the page at all. The boss man would just like further information from the field to whether or not this has been used with a successful or hazardous outcome.
AdamBrill
01-14-2003, 03:03 PM
Try doing this:
<a href="javascript:LoadMore()">Click Here!</a>
that will run the LoadMore() function when clicked. Hope that helps!
Beldale
01-14-2003, 03:22 PM
Sorry, I should have been more specific. The code you gave me would definitely work for simple items (actually we currently have a doNothing(); function there), however on the script I want to use I can not - I guess I could always break it apart and modify the function itself.
The reason for modification to the #[anchor] is the javascript:doNothing(); cancels out a submit of the form if selected while the form is being submitted.
Charles
01-14-2003, 03:24 PM
Of course, that will give you a link that does nothing one in ten times or so (http://www.thecounter.com/stats/2002/November/javas.php) making your boss look quite the fool. And if you are in the US then it might just get said boss in trouble with Department of Justice, Civil Rights Division (http://www.usdoj.gov/crt/foia/tal712.txt and http://www.usdoj.gov/crt/ada/q&aeng02.htm). You need no make sure that your page "fails safe" where there is no JavaScript. Write an alternate, JavaScript free page and make your link do double duty thusly:
And just how enabled/disabled Javascript relates to disabilities???:confused:
AdamBrill
01-14-2003, 04:52 PM
Charles, are you trying to say that if the site doesn't work without javascript, it is illegal???? You've got to be kidding, right?? What about freedom of press?
Charles
01-14-2003, 06:18 PM
Originally posted by AdamBrill
Charles, are you trying to say that if the site doesn't work without javascript, it is illegal???? That's exactly what I'm saying, in certain circumstances.
Relying upon JavaScript will make a page un-usable for persons with certain disabilities. And if your site is a part of an enterprise that is required to be accessible, then relying upon JavaScript will run you afoul of the law. Lets take the United States for an example. See http://www.usdoj.gov/crt/foia/tal712.txt for the US Department of Justice opinion that the ADA applies to the Internet. You will need to talk to an accessibility lawyer to determine if your enterprise is covered by the ADA but it is my understanding that:The title I employment provisions apply to private employers, State and local governments, employment agencies, and labor unions. Employers with 25 or more employees were covered as of July 26, 1992. Employers with 15 or more employees were covered two years later, beginning July 26, 1994 ... The ADA prohibits discrimination in all employment practices, including job application procedures, hiring, firing, advancement, compensation, training, and other terms, conditions, and privileges of employment. It applies to recruitment, advertising, tenure, layoff, leave, fringe benefits, and all other employment-related activities.If you advertise the job on you site or if your employees have any reason to use your site then you're covered by Title I if you have more than 14 employees. Title II covers State and local governments. And:A public accommodation is a private entity that owns, operates, leases, or leases to, a place of public accommodation. Places of public accommodation include a wide range of entities, such as restaurants, hotels, theaters, doctors' offices, pharmacies, retail stores, museums, libraries, parks, private schools, and day care centers. Private clubs and religious organizations are exempt from the ADA's title III requirements for public accommodations.If you are conducting any kind of business with your site then you are covered by Title III. (Quotes are courtesy of the United States Government. See http://www.usdoj.gov/crt/ada/q&aeng02.htm.)
AdamBrill
01-14-2003, 07:10 PM
Well, Charles, read the following:
From the United States Constitution
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.
What about that? I live in the United States, so I should be able to publish anything that I want, right? Another thing. Are flash sites illegal, too? People with certain disabilities probably can not access a flash site either. So, if every site that can not be accessed by people with *certain disablilities* is illegal, then I can name about 5 sites that ARE legal. Is this what you are trying to say? Please explain... Oh, and I am not a lawyer, so if you could point me to some sites that are in plain english, that would be appreciated.
Charles
01-14-2003, 07:48 PM
From said Constitution
Section 8. The Congress shall have power to ... regulate commerce with foreign nations, and among the several states, and with the Indian tribes.Title II, applying to the States and local governments, rests upon Amendment XIV but Titles I and III of the ADA apply strictly to commerce and Congress is given the right to regulate commerce. But that doesn't really make any difference. They're bigger than you are.
And yes, as a citizen of the US you can publish anything that you like as long as John Ashcroft approves and as long as you do not hurt anybody in the process. And it's not that somebody's trying to abridge your freedom of speech, it's that they are trying to keep you from abridging your own freedom of speech and only if you are a government entity, and employer of more than 14 persons or a public accommodation.
Charles
AdamBrill
01-14-2003, 07:57 PM
Ok, thanks for clarifying...:)
Vladdy
01-14-2003, 08:15 PM
How does javascript limit people with certain disabilities??? How about an example to go with your statement, huh?
Charles
01-14-2003, 09:10 PM
There are no ONMOUSEOVER events when the user, having no hands, is not using a mouse. And opening a window cannot happen when the user is listening to the page with a screen reader. Dynamic content doesn't work when the user is reading the page sequentially on a Braille browser. Or perhaps the user has a cognitive disability and has disabled JavaScript because things flashing and changing cause confusion. It doesn't matter though. People a great bit smarter and more learned in these matters than you or I have given it much thought. All we have to do is follow their rules. From the Web Content Accessibility Guidelines 1.0 (http://www.w3.org/TR/WCAG10/wai-pageauth.html#tech-scripts)
6.3 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. [Priority 1]
For example, ensure that links that trigger scripts work when scripts are turned off or not supported (e.g., do not use "javascript:" as the link target). If it is not possible to make the page usable without scripts, provide a text equivalent with the NOSCRIPT element, or use a server-side script instead of a client-side script, or provide an alternative accessible page as per checkpoint 11.4. Refer also to guideline 1.
Beldale
01-14-2003, 10:31 PM
Ok... very interesting subject. I work behind closed doors where anyone needing to use the intranet site at the very most can be color blind and we are constantly vigilant to code to allow for what our users may need. Nothing is color driven, we use different icons to distinguish different events and so forth.
Anyway, I want to thank everyone for their comments. I believe I will modify the code so that I may use a simpler function call.
Thank you.
Vladdy
01-15-2003, 12:06 PM
It still does not mean that pages that use javascript are illegal.
Utilization of javascript can be usually classified in two cases:
1. Improved presentation of a content that can be presented otherwise.
Good example is a javascript navigation system. Simple addition of <link rel="next", rel="previous", rel="index"> tags to the head makes pages ACCESSIBLE (even though not as conviniently). Following line in the navigation area will also be sufficient:
<noscript>This site relies on javascript for navigation. If you are unable to use javascript use <a href="sitemap.html">Site Map</a> page as an alternative</noscript>
2. Generation of a content that is not feasible to do by other means.
For example I have an online shopping application that heavily relies on javascript to improve user experience. For those who can not use it I can put:
<noscript>You need javascript enabled browser to shop online. You can also call 1-800-123-4567 to place your order.</noscript>
While the W3C GUIDELINES (!Laws) are nice and mean good, they are utopical. Unless you are developing for a gov you need to think about ROI. Doubling the cost of the project to add few percent of potential customers is rarely justifiable.
Charles
01-15-2003, 01:00 PM
If accessibility is doubling the cost of your project then you need to hire some competent people. People working on big projects report that using accesible methods makes the project easier and go faster. And accessible pages are also accessible to search engines.
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.