Closed
Bug 156727
Opened 23 years ago
Closed 21 years ago
www.takashimaya.co.jp/osaka/ - [INCORRECT BROWSER-SNIFFING]JavaScript scroll bar doesn't work
Categories
(Tech Evangelism Graveyard :: Japanese, defect)
Tech Evangelism Graveyard
Japanese
Tracking
(Not tracked)
VERIFIED
WORKSFORME
People
(Reporter: nomura, Unassigned)
References
()
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a+) Gecko/20020706
BuildID: 2002070621
The site has Javascript scroll bar, but it doesn't work.
Reproducible: Always
Steps to Reproduce:
1.go to http://www.takashimaya.co.jp/osaka/index.html
2.You can see "What's new" at the top left corner.
3.Click blue scroll bar which is placed left side of "What's new" area.
Actual Results: Nothing occures.
Expected Results: The area must be scrolled up and down.
IE works fine.
The symptom has continued for more than a year.
The source is ; ( Sorry it has some Japanese characters )
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);
// menu scroll ===========================================================#
Bottom1 = 180; //催し物のご案内 スクロール上限値の設定(レイヤーの高さ)
Top1 = 100;
Bottom1 -= Top1;
Bottom1 *= -1;
addpxsave = 0;
mouseflg = "";//whats new ボタンの押下状態
scrollpx = 5;//whats new 一度にスクロールする量
if (navigator.platform == "MacPPC")
{
if (navigator.appName.charAt(0) == "N")
{
scrollpx = 20;// Mac+NC
}
}
// ============================================== scroll(1)実行
function LayScll(addpx)
{
Top1 += (addpx * scrollpx);
if (Top1 > 20)
{
Top1 = 20;
}
if (Top1 < Bottom1)
{
Top1 = Bottom1;
}
if (navigator.appName.charAt(0) == "M")
{
document.all["menu11"].style.pixelTop = Top1;
}else{
if(navigator.userAgent.indexOf("Netscape6",0) > -1)
{
document.getElementById("menu11").style.top = Top1 + "px";
}else{
document.layers["menu11"].top = Top1;
}
}
if(mouseflg != "off")
{
addpxsave = addpx;
setTimeout("LayScll(addpxsave)",0);
}
}
// ============================================== イメージchg
function swImg(iName,str)
{
document.images[iName].src = str;
}
//
// ============================================== scrollボタン押下状態セット
function mouseflgset(parm)
{
mouseflg = parm;
if(mouseflg == "off")
{
if (navigator.appName.charAt(0) == "M")
{
swImg('b1','img/arrow_up_1.gif');
swImg('b2','img/arrow_down_1.gif');
}else{
if(navigator.userAgent.indexOf("Netscape6",0) > -1)
{
swImg('b1','img/arrow_up_1.gif');
swImg('b2','img/arrow_down_1.gif');
}else{
document.layers["scrollu2"].visibility = "hide";
document.layers["scrolld2"].visibility = "hide";
}
}
}
if(mouseflg == "on1")
{
if (navigator.appName.charAt(0) == "M")
{
swImg('b1','img/arrow_up_2.gif');
}else{
if(navigator.userAgent.indexOf("Netscape6",0) > -1)
{
swImg('b1','img/arrow_up_2.gif');
}else{
document.layers["scrollu2"].visibility = "visible";
}
}
}
if(mouseflg == "on2")
{
if (navigator.appName.charAt(0) == "M")
{
swImg('b2','img/arrow_down_2.gif');
}else{
if(navigator.userAgent.indexOf("Netscape6",0) > -1)
{
swImg('b2','img/arrow_down_2.gif');
}else{
document.layers["scrolld2"].visibility = "visible";
}
}
}
}
// ============================================== dummy script(netscape reroad対応)
function dummyscr()
{
a = 0;
}
// -->
</script>
Comment 1•23 years ago
|
||
When I click on the scroll bar, I see these errors in
Tools > Web Development > JavaScript Console:
Error: document.layers has no properties
Source File: http://www.takashimaya.co.jp/osaka/t_new.html
Line: 109
Error: document.layers has no properties
Source File: http://www.takashimaya.co.jp/osaka/t_new.html
Line: 93
The problem is, |document.layers| was a proprietary feature of
Netscape 4.x. It is not W3C-standard DOM syntax, and it is
no longer supported by Netscape or Mozilla.
Reassigning this report to the Tech Evangelism component so the
site can be contacted -
Assignee: rogerl → momoi
Component: JavaScript Engine → Asian
Product: Browser → Tech Evangelism
QA Contact: pschwartau → ruixu
Version: other → unspecified
Updated•23 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Can't work Japascrict scroll bar → [LAYER]JavaScript scroll bar doesn't work
Comment 2•23 years ago
|
||
Oops - the site IS trying to recognize the new Netscape browsers.
We can see that from the code Tomoo pasted above:
}else{
if(navigator.userAgent.indexOf("Netscape6",0) > -1)
{
document.getElementById("menu11").style.top = Top1 + "px";
etc.
The problem is, I don't think that is the correct way to detect the
Netscape browser. And it will never detect Mozilla browsers:
- Here is the |navigator.userAgent| string from a Netscape 7 browser:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020709
Netscape/7.0
- Here is the |navigator.userAgent| string from my Mozilla browser:
Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1a+) Gecko/20020701
In each case, the test being used at the site is going to fail:
|if(navigator.userAgent.indexOf("Netscape6",0) > -1)|
because the string "Netscape6" does not appear in Mozilla userAgents,
nor in Netscape 7 userAgents.
So the test fails, and Mozilla/Netscape7 falls into the |document.layers|
codebranch, which is why we get those errors above.
SUMMARY: the site is trying to detect modern browsers, but is not
doing it correctly. I will change the Summary above to reflect this -
Summary: [LAYER]JavaScript scroll bar doesn't work → [INCORRECT BROWSER-SNIFFING]JavaScript scroll bar doesn't work
Comment 3•22 years ago
|
||
changing component and QA.
Component: Asian → Japanese
QA Contact: ruixu → gashu
Comment 4•22 years ago
|
||
Changing component and QA.
Comment 6•21 years ago
|
||
http://www.takashimaya.co.jp/osaka/index.html no longer has "What's new".
-> WFM
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
Summary: [INCORRECT BROWSER-SNIFFING]JavaScript scroll bar doesn't work → www.takashimaya.co.jp/osaka/ - [INCORRECT BROWSER-SNIFFING]JavaScript scroll bar doesn't work
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•