[Typo3] OT: JavaScript depends on Doctype?

Heiner Lamprecht heiner at heiner-lamprecht.net
Sun Sep 25 11:05:53 CEST 2005


Hi Peter,

On Saturday 24 September 2005 22:53, Peter Klein wrote:
> Hi Heiner. It's because you need to prefix the positions with a
> unittype, like "px".
>
> Change:
>   document.getElementById("marker").style.marginLeft = xPos - 5;
>   document.getElementById("marker").style.marginTop = yPos - 5;
>
> Into:
>   document.getElementById("marker").style.marginLeft = (xPos -
> 5)+"px"; 
> document.getElementById("marker").style.marginTop = 
> (yPos - 5)+"px";

Thank's for opening my eyes.  Seems I was blind not seeing this 
point.

Now everything works fine. :-)



    Heiner

-- 
    heiner at heiner-lamprecht dot net    GnuPG - Key: 9859E373
  Fingerprint:  3770 7947 F917 94EF 8717 BADB 0139 7554 9859 E373



More information about the TYPO3-english mailing list