[Webdev] DHTML etc.
Lee Hosty
hostyle at csn.ul.ie
Fri Jun 7 12:36:20 IST 2002
At 12:17 PM 07/06/2002 +0100, John P. Looney wrote:
> Ah, OK. Now, I've got a <h2> inside the div, that I want to use as the
>titlebar for a window. When I click on it now, the javascript does start
>running....but it claims that:
>
>Error: thiscontent.moveTo is not a function
http://www.devguru.com/Technologies/ecmascript/quickref/javascript_index.html
moveto is for the window object or layers (netscape4) ...
you want:
thiscontent.style.top = parseInt(thiscontent.style.top) + changeinheight;
thiscontent.style.left = parseInt(thiscontent.style.left) + changeinwidth;
You need to use parseInt because the value is in pixels ie. 12px
I've seen problems in the past where you get .style.top and style.left is
undefined, so you need to make sure thiscontent has styles set, along the
lines of style="position: absolute; top: 20px; left: 20px" ...
HTH
> thiscontent being the div in question. So...what is allowed to use the
>moveTo ?
>
> > myDIV = document.getElementById("content")
> > myWindowbar = document.getElementById("windowbar")
>
> Yeah, I started using those, just in case. thanks!
>
>Kate
Lee Hosty -x- hostyle AT csn.ul.ie -x- +353 (0)86 8768780
--
We won't follow religion, we are one. - Arch Dandy, Marilyn Manson
More information about the Webdev
mailing list