View Full Version : Layers, and same form dividing into segments....dhtml

04-09-2003, 10:50 PM
okay, sorry for so many questions, but I have a project and I want to know 'certain' things before I embark on the architecture.

can you have one form, and have different parts of the form in diff. div/span tags..and layer one over the other, while filling in the 'same' form...and then submit it..

are there any issues of form data being lost when you stack layers or somesuch?

basically, will data that is entered/selected still hold their values once a new layer is placed 'over' the current layer or when you remove a layer...?


Roy Sinclair
04-10-2003, 03:55 PM
The answer depends on which browsers you're supporting. If it's just modern browsers then the answer is that you can divide the form up between many different layers, hide the layers, move them around and all will be well and submitted as long as all the layers are properly placed between the <form> and the </form> tags.

However, if you add Netscape 4 into the mix the whole thing falls apart since each "layer" in NS 4 is a wholly seperate document which would require it's own <form></form> pair for any form fields contained within and to get those items to submit you'll need to make sure the values they contain are copied from the layer into hidden values in a master form that is actually submitted. If you wish to move the layers around as well as just show/hide them you'll also find that NS 4 doesn't like to see those form tags moving and may not work at all.

Beyond NS 4 though it's entirely possible but you do need to keep in mind that your audience will need to have JS enabled or you'll need some clever styles to handle the cases where JS isn't enabled too.