Closed Bug 300153 Opened 19 years ago Closed 11 years ago

colorvision.com - Clicking JavaScript tabs results in no action.

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: tom.williams, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.9) Gecko/20050707 Firefox/1.0.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.9) Gecko/20050707 Firefox/1.0.5

When click the JavaScript tabs on the above page, nothing happens when the tab
body should change.

Reproducible: Always

Steps to Reproduce:
1.Go to http://www.colorvision.com/profis/profis_view.jsp?id=402
2.Click the "Features", "What you get", or "Requirements" tabs
3.Nothing happens

Actual Results:  
Nothing happens when the tabs are clicked.

Expected Results:  
The tab body should change as the tabs are clicked.

This works fine in Opera 8 and doesn't work in Mozilla 1.7.8.
( Flow when idx=0 )
 (1) javascript:tabTo(0);
 (2) setVisible(0, flase);
 (2-1) if (el == null && document.all)
    "el == null" is true
    => "el == null && document.all" is document.all object
       ( alert(document.all) displays [object HTML document.all class] )
    => "if (document.all)" is false (This is design)
 (2-2) if (el == null && document.getELementById)
    "el == null" is true
    => "el == null && document.getELementById" is getElementById object
       ( alert(document.getElementById) displays            )
       (    [function getElementById() { [native code] }] )
    => "if (getElementById)" is true
 (2-3) el = document.getElementById('tab'+idx);
    'tab'+0 => 'tab0'
    Since two DOM elements are defined with ID="tab0",
    Mozilla/Firefox returns the first one. (This is design) 
       ( document.getElementById("tab0") => [object HTMLUnknownElement] )
       ( document.getElementById("tab0").nodeName => LAYER              )
 (2-4) Changing of style attributes of an element for <LAYER> does nothing.

I don't know whether "ignoring unknown tag" should include "ignoring ID
attribute of unknown tag" or not.

(Reason why the scripts work on IE and Opera)
Since IE(and Opera) returns true for ("if document.all") and returns element
array for document.all[<ID attribute value>],
same ID can be accessed using document.all.tab0[index].
But this is different from W3C specicication on ID attribute.

[ Link definition by the site ]
   <a href="javascript:tabTo(0);" class="details">Description&nbsp;</a>
   <a href="javascript:tabTo(1);" class="details">Features&nbsp;</a>
   <a href="javascript:tabTo(2);" class="details">What You Get&nbsp;</a>
   <a href="javascript:tabTo(3);" class="details">Requirements&nbsp;</a>

[ Function definition by http://www.colorvision.com/includes/tabs.js ]
   function tabTo(idx) {
    if (lastIdx != null) setVisible(lastIdx, false);
    setVisible(idx, true);
    lastIdx = idx;
   }
   function setVisible(idx, b) {
    var el = null;
    if (el == null && document.all)
    	el = document.all['tab'+idx];
    if (el == null && document.getElementById != null)
    	 el = document.getElementById('tab'+idx);
    if (el == null && document.layers != null)
    	 el = eval("document.tab"+idx);
    if (el == null) return null;
    if (el.length != null) el = el[el.length-1];

    if      (el.style != null)      el.style.display = (b ? '' : 'none');
    else if (el.visibility != null) el.visibility    = (b ? 'show' : 'hide');

    return el;
   }

[ Elements with ID="tabN" ]
   <layer id="tab0" visibility="hidden">
   <div id="tab0"> <span>Description</span> (snip) </div>
   </layer>
   <layer id="tab1" visibility="hidden">
   <div id="tab1"> <span>Features and Benefits</span> (snip) </div>
   </layer>
   <layer id="tab2" visibility="hidden">
   <div id="tab2"> <span class="title">What You Get</span> (snip) </div>
   </layer>
   <layer id="tab3" visibility="hidden">
   <div id="tab3"> <span class="title">Requirements</span> (snip) </div>
   </layer>
Status: UNCONFIRMED → NEW
Ever confirmed: true
CC-ing to Boris.
Should "ID attribute on unknown tag" be considered as valid ID in DOM?
> Should "ID attribute on unknown tag" be considered as valid ID in DOM?

Yes, in tag-soup (anything sent as text/html).  Or for XML it should be an ID
based on the namespace (or DTD, if any).  The tagname doesn't matter for this
purpose.

So the problem here is that multiple tags have the same ID, right?  And we have
to pick which to return from getElementById and the page expects the other one?
 Sounds like Tech Evang to me.
(In reply to comment #3)
> The tagname doesn't matter for this purpose.
I see. Thanks Boris.

Since ID has meaning and is important on HTML browser or XML parser even on
invalid/unknown tag name, this bug is aparently Tech evangelism bug.
But "multiple tag of same ID" issue is already & repeatedly reported one.
So I believe "Reporter Tool" is better for this site's problem.

To bug opener : Report this site to reporter.mozilla.org, please.
                ( http://reporter.mozilla.org/app/ )
See http://www.mozillazine.org/talkback.html?article=6799 for Reporter Tool and
reporter.mozilla.org.

Boris, can this bug be closed as INVALID?
(In reply to comment #4)
> To bug opener : Report this site to reporter.mozilla.org, please.
>                 ( http://reporter.mozilla.org/app/ )
> See http://www.mozillazine.org/talkback.html?article=6799 for Reporter Tool and
> reporter.mozilla.org.

I'll do that now.  Thanks!
(In reply to comment #5)
> (In reply to comment #4)
> > To bug opener : Report this site to reporter.mozilla.org, please.
> >                 ( http://reporter.mozilla.org/app/ )
> > See http://www.mozillazine.org/talkback.html?article=6799 for Reporter Tool and
> > reporter.mozilla.org.
> 
> I'll do that now.  Thanks!

I can't run the Reporter Tool (don't have access to it anywhere) and I've sent a
message to the tool developer for assistance. I'll get this site reported when
I'm able to do so.

Thanks in advance for your patience.
Why reporter tool?  That's for people who would find it too much pain to file
bugs, which is clearly not the case here!

This just sounds like a tech evang bug, pure and simple.
Assignee: nobody → english-us
Component: General → English US
OS: Windows 2000 → All
Product: Firefox → Tech Evangelism
QA Contact: general → english-us
Hardware: PC → All
Summary: Clicking JavaScript tabs results in no action. → colorvision.com - Clicking JavaScript tabs results in no action.
(In reply to comment #7)
> Why reporter tool?  That's for people who would find it too much pain to file
> bugs
> This just sounds like a tech evang bug, pure and simple.

Do you mean? - 
  "opening tech evang bug" will always be done as official procedure in next to
  analysis and prioritizing of report by "Reporter Tool"?
If yes, I misunderstood that "tech evang" activity will shift to Reporter
Tool.(ie. asking site for correction will be done without opening tech evang bug)
And if yes, I also can't imagine other than changing to "tech evang bug".

Boris, thanks for changing.
(In reply to comment #7)
> Why reporter tool?  That's for people who would find it too much pain to file
> bugs, which is clearly not the case here!
> 
> This just sounds like a tech evang bug, pure and simple.

Cool, since I haven't figured out how to run the Reporter Tool yet anyway.  :)

Thanks!

Peace...
(In reply to comment #9)
Bugzilla is for me(and you) who've found it too much pain to report by "Reporter
Tool". :-)
tom.williams, sorry for my misdirection.
URL is obsolete.
[closeme]
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.