I have a complex input form within a PHP based web application. To structure it a bit, I introduced "Multifaceted lightbox" to let parts of the form - named inline DIVs with "display" set to "none" - appear within a "lightbox" style dialog box. It works great, until just now I realized that when it displays a DIV, it copies it into its centered DIV, taking it out of the form - and all changes to input forms contained in there are lost.
The code in question in the mf_lightbox code that makes a inline DIV into a centered lightbox dialog is:
showBoxByID : function(id, boxWidth, boxHeight) {
this.lightboxType = 'id';
this.lightboxCurrentContentID = id;
this.setLightboxDimensions(boxWidth, boxHeight);
var element = $(id);
var contents = $('mf_boxContents');
contents.appendChild(element); // <!-- This is where it happens
Element.show(id);
this.showBox();
return false;
},
does anybody know a way to not copy, but somehow "attach" the div to the boxContents layer, so it stays in the form dom-wise? Like a pointer in a programming language? This mf_lightbox is quick, great and I would very much like to stay with it.
Am I being clear enough? Do you get what I mean? Do you know lightbox alternatives that do this differently?
Thanks in advance for your answers!