Closed Bug 270720 Opened 20 years ago Closed 17 years ago

goldmansachs.com - onlineopinion.js should use O_NS6 variable more

Categories

(Tech Evangelism Graveyard :: English US, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Unassigned)

References

()

Details

In old mozillas, you get:

Error ``opinion_layer is not defined'' [xs] in file
``http://www.goldmansachs.com/onlineopinion/onlineopinion.js'', line 89,
character 0.
Exception ``ReferenceError: opinion_layer is not defined'' thrown from function
display_opinion_layer() in
<http://www.goldmansachs.com/onlineopinion/onlineopinion.js> line 89.
[e] message = [string] "opinion_layer is not defined"
Stopped for thrown exception.
#0: function display_opinion_layer() in
<http://www.goldmansachs.com/onlineopinion/onlineopinion.js> line 89
087: else
088: {
089: opinion_layer.style.left =
DL_GetElementLeft(document.images["feedback_image"]) - 75;
090: opinion_layer.style.top =
DL_GetElementTop(document.images["feedback_image"]) - 30;
091: 

In current mozillas, you get:
Warning: Element referenced by ID/NAME in the global scope. Use W3C standard
document.getElementById() instead.
Source File: http://www.goldmansachs.com/onlineopinion/onlineopinion.js
Line: 89

current code:
     78 function display_opinion_layer()
 -   79 {
 -   80     if(O_NS4)
     81     {
 -   82         document.opinion_layer.left = document.feedback_image.x - 75;
 -   83         document.opinion_layer.top = document.feedback_image.y - 30;
     84         
 -   85         document.opinion_layer.visibility = "show";
     86     }
     87     else
     88     {
 -   89         opinion_layer.style.left =
DL_GetElementLeft(document.images["feedback_image"]) - 75;
 -   90         opinion_layer.style.top =
DL_GetElementTop(document.images["feedback_image"]) - 30;
     91         
 -   92         opinion_layer.style.visibility = "visible";
     93     }
     94 }

suggested code:
function display_opinion_layer()
{
    if(O_NS4)
    {
        document.opinion_layer.left = document.feedback_image.x - 75;
        document.opinion_layer.top = document.feedback_image.y - 30;

        document.opinion_layer.visibility = "show";
    }
    else if (O_NS6 || O_IE4)
    {
        if(O_NS6)
           opinion_layer = document.getElementById("opinion_layer");
        opinion_layer.style.left =
DL_GetElementLeft(document.images["feedback_image"]) - 75;
        opinion_layer.style.top =
DL_GetElementTop(document.images["feedback_image"]) - 30;

        opinion_layer.style.visibility = "visible";
    }
}
Not any more you don't. FIXED.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.