I renamed layer1 such that it reads
     var layerHandle = this.document.all['layer1'];

  However that doesn't seem to make any difference.

  It almost seems like it's a layers/divs/tables problem. If I put the <div> 
outsided of the <td></td> it ends up in the correct vertical position, but 
not in the correct horizontal position. But then I move the <div> inside the 
<td></td> it jumps to the correct horizontal position, but is off quite a 
bit vertically.
  In netscape it looks fine.

  The code is really simple (very bottom)...can someone see if they have any 
ideas? All the examples I find deal with layers relative to each other, not 
relative to fixed HTML elements, like tables.

  Thank you much,
  James

>From: "Abre Chase" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: RE: [Dynapi-Help] Re: Dynapi layer positioning (help)
>Date: Tue, 2 Apr 2002 15:01:29 -0500
>
>I seem to remember a problem in IE with using the same name for the 
>object's javascript handle and the ID of the object.  You may try changing 
>this line:
>
>var layer1 = this.document.all['layer1'];
>
>...to use a different variable name.
>
>- Abre
>
>-----Original Message-----
>From: James Musick [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 02, 2002 2:10 PM
>To: [EMAIL PROTECTED]
>Subject: [Dynapi-Help] Re: Dynapi layer positioning (help)
>
>
>   I partially figured out the difficulties I was having before...I didn't
>realize that inline.js was actually making 'normal' javascript objects into
>DynAPI objects (and thus giving the getX() methods). Now the examples that 
>I
>was seeing make much more sense.
>
>   My layer now seems to work nicely with Netscape, but not with IE!! A
>simplified version is included below...in IE the layer shows up below the
>table. The idea is for the layer to be dropped into a particular <td>.
>Unfortunately the layer shows up quite a bit below the table in IE.
>
>Anyone see the problem? Or have a fix suggestion?
>
>Thank you much,
>James
>----------------------
>in head (in script tags, of course):
>     DynAPI.setLibraryPath('script/dynapi/src/lib/')
>     DynAPI.include('dynapi.api.browser.js')
>     DynAPI.include('dynapi.api.dynlayer.js')
>     DynAPI.include('dynapi.api.dyndocument.js')
>     DynAPI.include('dynapi.ext.inline.js')
>     var xPos;
>     var yPos;
>     var pagexPos;
>     var pageyPos;
>DynAPI.onLoad = function()
>{
>     var layer1 = this.document.all['layer1'];
>     xPos = layer1.getPageX();
>     yPos = layer1.getPageY();
>     alert(xPos + ":" + yPos);
>     var dataLayer1 = new DynLayer(dataLayer1, xPos, yPos, 30, 20,
>"#c0c0c0","visible");
>     dataLayer1.setHTML("foo");
>     DynAPI.document.addChild(dataLayer1);
>}
>
>in body:
>table border=1
>tr
>     <td> row1</td>
>     <td> r1 cell 2</td>
>     <td> r1 cell 2</td>
>     <td> r1 cell 2</td>
>/tr
>tr
>     <td> row2</td>
>     <td> r2 cell 2</td>
>     <td> r2 cell 2</td>
>     <td> r2 cell 2</td>
>/tr
>tr
>     <td> row3</td>
>     <td> r3 cell 2</td>
>     <td> r3 cell 2</td>
>     <td><div id="layer1" style="position:relative;"></div></td>
>/tr
>/table


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to