Closed Bug 253062 Opened 20 years ago Closed 11 years ago

abetz-rouse.com.au - Cannot write to the status bar with javascript in links, when DHTML conponents are on the page

Categories

(Tech Evangelism Graveyard :: English Other, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: gordon_e_rouse, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030

If you place the following directive inside a link:
ronMouseOver="window.status='Some Status Text';return true;" normally the line
'Some Status Text' would write to status bar. On simple web pages this always
works. 

I discovered that when DHTML menus are used, the status bar cannot be written to. 
OK I admit that seems far fetched and totally unrelated, but if you make a copy
of the website page with the DHTML components the window.status='XXX' never
work, the moment you comment out the javascript line that writes the hidden
layers, the window.status='XXX' starts working again.

Reproducible: Always
Steps to Reproduce:
1.Load page http://abetz-rouse.com.au/status_test.html
2.Roll over the second link and status bar is blank
3.Load page http://abetz-rouse.com.au/status_test_no_dhtml.html
4.Roll over the second link and the status bar is written to
Actual Results:  
Despite the javascript that should set the status bar to the status bar, the
status bar remained blank. In the second instance only the call to write the
DHTML invisible layers was commented out and the status write worked. 

Expected Results:  
On both pages I would expect that "window.status='Some Text';return true;" to work
onmouseout="FW_startTimeout();return false"

1. You need to change that to onmouseout="FW_startTimeout();return true"
2. You also need to remove the (last) line status="" in the function writeMenus

Then it works.  I can understand why 1 is needed, but not 2 - is a global
status variable blocking window.status ?
Assignee: general → general
Component: JavaScript Engine → DOM: HTML
QA Contact: pschwartau → ian
(In reply to comment #1)
> Then it works.  I can understand why 1 is needed, but not 2 - is a global
> status variable blocking window.status ?

the global scope in javascript _is_ |window|. so window.foo is equivalent to foo.
and assignment to undeclared variables makes them global.
OK, so why was it necessary to remove the status="" line then?
The writeMenus function is only called once and I don't see how that line
can affect later assignments to window.status.
Also, if I change it to window.status="" then it also works.
"status" is a replaceable variable.  So if you write to a global "status" var,
not window.status, then instead of setting window.status it sets a global status
var (on the window object, since that's the global object), which shadows
window.status thereafter.

That behavior is needed for compat with existing websites.
So is this WONTFIX, or INVALID, or possibly evangelism?

/be
I supposed evangelism. fw_menu.js is available from
<http://www.macromedia.com/support/fireworks/ts/documents/commented_js_file.htm>
and is also available as a later version mm_menu.js which has the same problem. 

Any of you guys have a good contact at MM?
FWIW, the original code does not have this problem:
http://developer.netscape.com/viewsource/smith_menu/menu.js
Over to evangelism.
Assignee: general → english-other
Status: UNCONFIRMED → NEW
Component: DOM: HTML → English Other
Ever confirmed: true
Product: Core → Tech Evangelism
QA Contact: ian → english-other
Summary: Cannot write to the status bar with javascript in links, when DHTML conponents are on the page → abetz-rouse.com.au - Cannot write to the status bar with javascript in links, when DHTML conponents are on the page
Version: Trunk → unspecified
Pages no longer exist.
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.