you example does not really show what you are talking about?
the reason you are getting the error is because you are attempting to add a dynlayer to parent that already contains that layer.

As for "saving" the form, what do you mean?  do you mean saving the html file?  if this is the case, the browser is simply saving the surce that was downloaded from the net, this is because the content created after laoding the page is dynamic and not actually part of the original page.

Khairan wrote:

Hi all, I'm new to dynapi and fiddling with it for a Lotus Domino app which can load childlayer images to a drawing layer(parent), drag them around and later save the document to a database. I load a big layer on the onload event which I call parentlayer.After that the user can add images to this parentlayer by calling my MakeLayer() function.MakeLayer() creates childlayers into it's parent - parentlayer. I can add layers and drag them around parentLayer, but my problem is that when I save the form, whatever layers added into parentlayer does not get saved, only parentlayer is visible. When I make a call to DynAPI.document.addChild(parentLayer) in my saveForm() routine, it gives a message Dynlayer already exist. Where have I gone wrong?  Thanks in advance. Part of the code is below. khairan.   var parentLayer,myLayer,x,y; DynAPI. {parentLayer=new DynLayer(null,250,90,500,300,'#c0c0c0'))DynAPI.document.addChild(parentLayer) function MakeLayer(image,x,y){myLayer=new DynLayer(null,10,10,x,y,'')myLayer.setBgImage(image)myListener=new EventListener(myLayer)myListener.>target=e.getTarget()target.removeFromParent()}myLayer.addEventListener(myListener)DragEvent.setDragBoundary(myLayer)DragEvent.enableDragEvents(myLayer)parentLayer.addChild(myLayer)} function saveForm() {form = document.forms[0];DynAPI.document.addChild(parentLayer)form.submit();}

--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
 

Reply via email to