I'm trying to construct a tabbed dialogue to handle large and complex submission forms. The javascript is to be generated on the fly by a perl module which is passed the required HTML for each tab as it's parameters.
My first attempt used a div element and wrote the relevant HTML chunks to the div's innerhtml property. Although this looked great, the form fields would not retain value or post. I looked at palbano's answer to PoppapumpJ's question in thread 510405 and now understand why but, to use his technique, I would need to be able to convert arbitrary HTML into the correct series of [tt]createElement()[/tt] and [tt]setAttribute()[/tt] calls. This solution seems disproportionally complex.
I have seen another type of solution using ilayers where the tab controls set the visibility of the various ilayers. This would seem to get around the "dynamically created element won't post" problem but introduces a further problem.
The ilayers need to occupy the same space on screen in order to work correctly. In every example that I have seen, the postitions of the various ilayers are set to "absolute" and then set to literal values. I can't do this as I have no control over where my module is called - it's output could end up anywhere in the browser's window as part of a more complex page.
Is it possible to draw the first, visible ilayer wherever it lands (with it's position set to "relative"
and then read it's position variables?. I could then set these values as the position for subsequent ilayers to get the required overlap - maybe in the body [tt]onLoad[/tt] element.
Alternatively, if I'm missing another obvious approach, I would be grateful for suggestions.
Yours,
Is it possible to "As soon as we started programming, we found to our surprise that it wasn't as
easy to get programs right as we had thought. Debugging had to be discovered.
I can remember the exact instant when I realized that a large part of my life
from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilk
My first attempt used a div element and wrote the relevant HTML chunks to the div's innerhtml property. Although this looked great, the form fields would not retain value or post. I looked at palbano's answer to PoppapumpJ's question in thread 510405 and now understand why but, to use his technique, I would need to be able to convert arbitrary HTML into the correct series of [tt]createElement()[/tt] and [tt]setAttribute()[/tt] calls. This solution seems disproportionally complex.
I have seen another type of solution using ilayers where the tab controls set the visibility of the various ilayers. This would seem to get around the "dynamically created element won't post" problem but introduces a further problem.
The ilayers need to occupy the same space on screen in order to work correctly. In every example that I have seen, the postitions of the various ilayers are set to "absolute" and then set to literal values. I can't do this as I have no control over where my module is called - it's output could end up anywhere in the browser's window as part of a more complex page.
Is it possible to draw the first, visible ilayer wherever it lands (with it's position set to "relative"
Alternatively, if I'm missing another obvious approach, I would be grateful for suggestions.
Yours,
Is it possible to "As soon as we started programming, we found to our surprise that it wasn't as
easy to get programs right as we had thought. Debugging had to be discovered.
I can remember the exact instant when I realized that a large part of my life
from then on was going to be spent in finding mistakes in my own programs."
--Maurice Wilk