Closed
Bug 237997
Opened 20 years ago
Closed 20 years ago
I cannot get CSSP to work. I am trying to move a SPAN around the page
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: krochele, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 Given the following JAVASCRIPT when event onMouseOver happens I execute ttOn() and when onMouseOut happens I execute ttOff(). The visibility and display parts work fine the positioning parts do not work at all. I have spent two days reading and trying all the combinations of things I can think of to no avail. It works in IE, does not work in MOZILLA, FireBird, netscape 6.1 <script language="JavaScript1.2" type="text/javascript"> <!-- var xOfSet=0 var yOfSet=0 var bwsr ="unknown" function ttOn(evt,currElem){ if (document.layers) { xOfSet=window.pageXOffset yOfSet=window.pageYOffset bwsr="Netscape6-:" } else { if (document.all) { xOfSet=document.documentElement.scrollLeft yOfSet=document.documentElement.scrollTop bwsr="IE:" } else { if (document.getElementById) { xOfSet=window.pageXOffset yOfSet=window.pageYOffset bwsr="Net6:" } } } popUpWin = document.getElementById(currElem).style; if (document.all) { popUpWin.top =parseInt(evt.y)-10+yOfSet; popUpWin.left=Math.max(2,parseInt(evt.x)+10+xOfSet); } else { popUpWin.top =parseInt(evt.pageY)-10+yOfSet; popUpWin.left=Math.max(2,parseInt(evt.pageX)+10+xOfSet); } popUpWin.visibility = "visible" ; popUpWin.display = "inline" ; } function ttOff(currElem){ popUpWin = document.getElementById(currElem); popUpWin.style.visibility = "hidden" popUpWin.style.display = "none" } //--> </script> Reproducible: Always Steps to Reproduce: 1. 2.See details above 3. Actual Results: The SPAN displays but the position does not change then the SPAN disappears when onMouseOut occurs. Expected Results: onMouseOver the SPAN should display and move to the right of the mouse. onMouseOut it should disappear. This causes the web pages to NOT be portable across platforms.
Comment 1•20 years ago
|
||
What's the doctype on the page? To actually be correct CSS, you would need to do: popUpWin.top =parseInt(evt.pageY)-10+yOfSet + "px"; popUpWin.left=Math.max(2,parseInt(evt.pageX)+10+xOfSet) + "px"; but we will allow the version you're using in quirks mode.... If you can attach the page in question to this bug using http://bugzilla.mozilla.org/attachment.cgi?bugid=237997&action=enter that would help.
Reporter | ||
Comment 2•20 years ago
|
||
I added the "px". I was unaware that it needed the units. I assumed it dealt with pixels. I also had to drop the offsets since Mozilla cursor position is relative to the page and IE position is relative to the screen. Thanks fo rthe help
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Comment 3•20 years ago
|
||
Nothing was fixed. The bug report was simply INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 4•20 years ago
|
||
I concur it was invalid. I could not find out from the documentation what the proper coding form was.
Comment 5•20 years ago
|
||
<http://www.w3.org/TR/2004/CR-CSS21-20040225/syndata.html#length-units>: > The format of a length value (denoted by <length> in this specification) is a > <number> (with or without a decimal point) immediately followed by a unit > identifier (e.g., px, em, etc.). After a zero length, the unit identifier is > optional.
Reporter | ||
Comment 6•20 years ago
|
||
THank you.
You need to log in
before you can comment on or make changes to this bug.
Description
•