Hi there,
I posted this problem on another forum and although more than 30 people looked at it there wasn't a single reply. Have I really discovered an unsolvable Javascript problem?
I'm an absolute novice at javascript so please be gentle.
I am using a js styleswitcher to offer alternative displays.
The menu that links to the script that does the job looks like this:
Code:
*****************************************************
<ul>
<li><a href="#content" tabindex="1" >Skip to Content:</a></li>
<li><a href="accessibility_help.php" title="Read our Accessibility Policy">Accessibility Help:</a></li>
<li><a href="#" onclick="setActiveStyleSheet('default');return false;" onkeypress="setActiveStyleSheet('default'); return false;" title="Default Page Style">DEFAULT</a></li>
<li><a href="#" onclick="setActiveStyleSheet('hicontrast');return false;" onkeypress="setActiveStyleSheet('hicontrast'); return false;" title="High Contrast Version">HI CONTRAST</a></li>
<li><a href="#" accesskey="t" onclick="setActiveStyleSheet('textonly');return false;" onkeypress="setActiveStyleSheet(textonly'); return false;" title="Text Only Version">TEXT ONLY</a></li>
</ul>
**************************************************
The switcher works perfectly in all browsers but in Firefox and Opera it seems to be interfering with the ability to tabindex. I am guessing it is the way these browsers handle onkeypress or return false rather that an error in the js switcher itself. This is a problem because the reason I am implimenting the switcher in the first place is for accessibility reasons.
Does anyone have any ideas?
Loquela
I posted this problem on another forum and although more than 30 people looked at it there wasn't a single reply. Have I really discovered an unsolvable Javascript problem?
I'm an absolute novice at javascript so please be gentle.
I am using a js styleswitcher to offer alternative displays.
The menu that links to the script that does the job looks like this:
Code:
*****************************************************
<ul>
<li><a href="#content" tabindex="1" >Skip to Content:</a></li>
<li><a href="accessibility_help.php" title="Read our Accessibility Policy">Accessibility Help:</a></li>
<li><a href="#" onclick="setActiveStyleSheet('default');return false;" onkeypress="setActiveStyleSheet('default'); return false;" title="Default Page Style">DEFAULT</a></li>
<li><a href="#" onclick="setActiveStyleSheet('hicontrast');return false;" onkeypress="setActiveStyleSheet('hicontrast'); return false;" title="High Contrast Version">HI CONTRAST</a></li>
<li><a href="#" accesskey="t" onclick="setActiveStyleSheet('textonly');return false;" onkeypress="setActiveStyleSheet(textonly'); return false;" title="Text Only Version">TEXT ONLY</a></li>
</ul>
**************************************************
The switcher works perfectly in all browsers but in Firefox and Opera it seems to be interfering with the ability to tabindex. I am guessing it is the way these browsers handle onkeypress or return false rather that an error in the js switcher itself. This is a problem because the reason I am implimenting the switcher in the first place is for accessibility reasons.
Does anyone have any ideas?
Loquela