Forum Moderators: open
XHTML
<a onclick="themesshow();" ...
JavaScript
function themesshow() {change('themes', 'promptshow'); promptshow(); ajaxpage('templates/ajax-prompt-themes.php', 'themesfocus'); document.getElementById('themesfocus').focus();}
The bold text in the JavaScript is what is triggering the console error in iCab. How can I keep iCab smiling?
- John
*Edited for spelling goof, doh!*
[edited by: JAB_Creations at 5:42 am (utc) on June 30, 2007]
Try tried replacing the statement with:
alert(typeof document.getElementById('themesfocus')) I don't know how reliable the debugger messages are. I'm suspicious that you have a function called promptshow, whilst you are passing the string "promptshow" toa function. You don't happen to have an element with id, "promptshow" somewhere do you? It may cause a gobal namespace conflict.
I figure this is either a browser quirk or a really picky JavaScript engine?
Hhhhmmm, I have no experience of iCab either I'm afraid, but ICab's Wikipedia page does list this as one of its criticisms, "Incompatibility with more intricate JavaScript-powered web sites" (although this is not backed up with any examples).
"iCab JavaScript Alert"
"! Object"
(Dialog was opened by "((my local IP here))"
What this script does is open a layer dead center of the page...the AJAX loads a template page (content not included reduces overall page load, template page is cached, genius really). The last part that iCab isn't able to swallow is for accessibilities. It gives focus to the targeted id so (right now only Gecko browsers (for the most part) correctly handle tabbed navigation) users can use the keyboard to navigate the page (without any need for a mouse).
- John
Anyway if I don't give the overflow element focus it messes up the second tabbing sequence (when the user has exhausted all possible tabable elements and it recycles) in Gecko. So it's part of what I have to do to allow folks using Gecko to have full keyboard accessibility.
So that's not an error message? Yes, it does not do anything in iCab.
- John