Closed Bug 154508 Opened 22 years ago Closed 11 years ago

tesco.com - uses document.all to highlight links

Categories

(Tech Evangelism Graveyard :: English Other, defect)

x86
All
defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: pschwartau, Unassigned)

References

()

Details

(Whiteboard: [havefix] [bug248549notfixed])

You need a login to access the site fully. Here is a test account from bug 97994, "Online store does not work" email: bugzilla@zbarsky.org password: bugzilla STEPS TO REPRODUCE 1. Load http://www.tesco.com 2. Click on the "Shopping" tab at the top 3. Click on "Groceries from your local Tesco" near the top 4. Login using a valid email and password (e.g. above) 5. Click on "My Favourites" at the left (heart icon) 6. Errors appear in the JS Console and the query fails: Error: daAddBasketBut is not defined Source File: http://www.tesco.com/superstore/ActionMenu/ActionMenu.htm Line: 19 etc. etc. This is caused by code at the site that has no Mozilla codepath. From http://www.tesco.com/superstore/ActionMenu/ActionMenu.htm: if (document.layers) { daButCheckout = document.layers['ButCheckout']; daButBasket = document.layers['ButBasket']; daAddBasketBut = document.layers['ButAddBasket']; <<<---|daAddBasketBut| daAmendBasketBut = document.layers['ButAmdBasket']; daFavMaintBut = document.layers['ButFavMaint']; } else if (document.all) { daButCheckout = document.all['ButCheckout'].style; daButBasket = document.all['ButBasket'].style; daAddBasketBut = document.all('ButAddBasket').style; <<<---|daAddBasketBut| daAmendBasketBut = document.all('ButAmdBasket').style; daFavMaintBut = document.all('ButFavMaint').style; } Since |document.layers| is Netscape 4.x only, Mozilla/N6/N7 falls into the |document.all| codepath. But |document.all| is IE-only, so the code fails and execution stops.
cc'ing 101355.471@compuserve.com, who first discovered this bug -
tesco.com seem to have fixed this. They have rewritten their menus to use straight html links and a cache-friendly URL. I have been able to navigate successfully using mozilla 1.1 There are one or two other problems, but they're not browser-specific (I've seen them on Phoenix 0.1 and IE5.5), and are probably to do with failed lookups being cached. Someone should probably mark this closed.
I'm still seeing such errors in the JavaScript Console as Error: document.all has no properties Source File: http://www.tesco.com/superstore/leftbar/favouritesmainmenu.asp Line: 17 101355.471@compuserve.com, mozilla@jrockey.com: Do you find the site to be fixed now?
The error in Comment #4 is in a js function that just tries to highlight the selected link by changing its "class". I hadn't noticed it wasn't working. The old code used to use document.all to populate the actual data into the main frame, so the site wasn't usable at all.
Indeed the site does appear to work for me now, but I haven't delved into the consequences of the latest java script error reported today.
Site now works for me (Mozilla 1.2alpha/Linux)
ok, low severity for now, new summary. I didnt went deeper into that code, but if they are using document.all to change the className that should be fixed by using document.getElementById instead. anyone to contact them about the issue ?
Severity: normal → trivial
Summary: [LAYER] Site has no Mozilla codepath on some pages → tesco.com - uses document.all to highlight links
Whiteboard: [havefix]
New Component
Component: Europe: West → English Other
en other default owner
Assignee: nitot → english-other
QA Contact: brantgurganus2001 → english-other
bug 248549 partially fixes some of the problems
Whiteboard: [havefix] → [havefix] [bug248549notfixed]
Pascal, what problems are you still seeing? In the meantime it looks like they have redone the site again with some heinous frames and client side redirects. This page (normally in a frame): http://www.tesco.com/superstore/p/favourites/FavouritesFirstHelp.htm is probably the equivalent of the favourites page mentioned earlier and it seems OK, although you would have to buy something in order to get items into it. Browsing with IE 6 it looks the same. A cursory look through some of their .js files shows no references to document.all. Suggest closing WFM unless someone can identify an existing problem. Tested, Mozilla 1.7.3 (so without the document.all I think)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.