I'm trying to use the Control.Modal library to create a modal window. The problem I have is that I'm trying to use an existing hidden div as the div of the actual modal windows, not just the contents of the modal window. The existing hidden div contains a form which has JavaScript validations using the id of the different form elements. I know I can pass in myDiv.innerHTML as the contents option to load the contents, but then I have two forms with the same name and form elements with conflicting ids (which screws up validation and other things).
Is there a way to have Control.Modal use an existing div as the modal window? In other words, I'm basically just looking to use Control.Modal to fade the page, center an existing div, and then show it. Am I better off just doing it myself, or can Control.Modal do this?
I'm trying to use the Control.Modal library to create a modal window. The problem I have is that I'm trying to use an existing hidden div as the div of the actual modal windows, not just the contents of the modal window. The existing hidden div contains a form which has JavaScript validations using the id of the different form elements. I know I can pass in myDiv.innerHTML as the contents option to load the contents, but then I have two forms with the same name and form elements with conflicting ids (which screws up validation and other things).
Is there a way to have Control.Modal use an existing div as the modal window? In other words, I'm basically just looking to use Control.Modal to fade the page, center an existing div, and then show it. Am I better off just doing it myself, or can Control.Modal do this?
Posted June 8th, 2007 at 10:19am by Temuin_12