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
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!