More dialog problems
More dialog problems
I posted earlier about some cosmetic problems I've been having with
dialogs, but now I've run into one that is rather more serious.
My aim is to turn the controls in a form into a floating toolbar so
users can keep it handy while working on a submission. Most of the
items in the toolbar are simple buttons that fire off javascripts when
clicked and aren't a problem. but the submit button is a different
story. When clicked it should submit the form.
The controls are all kept in a div in my form which I then grab and
turn into a dialog. Unfortunately the dialog code seems to work by
pulling the HTML you want wrapped in a dialog out of its original
location in the DOM and injecting it into the newly created empty
dialog box instead. This means that when you do it to a form control
the control in question is no longer associated with its parent form.
In other words, it breaks the submit button.
Befroe trying the floating toolbar approach the buttons were simply
being kept in an absolutely positioned div. This meant I could put
them where I wanted but they remained a part of the form semantically
and so there weren't any problems with the submit button.
Has anyone else run into a problem like this one?