This question is locked. New answers and comments are not allowed.
I have multiple forms I need to display in windows on my page. Originally I was creating the windows and including them by rendering them out at the bottom of the page I needed them on. Unfortunately, I hit a snag. Several of the forms have fields with the exact same name. As I'm binding the forms to the model, I cannot provide unique names or I don't get the data posted.
Now, I've moved them out to javascript and am creating the windows as and when I need them, destroying them after so that no form fields overlap. Unfortunately, if I remove the last server side renderaction of a window, I then can't create the windows. "create is undefined".
So, three questions / problems;
How do I have multiple forms on the same page with the the same field names (they aren't the same model). ?
How do I create the windows purely in Javascript, not requiring any server side includes, I've tried getting the scripts in by including the relevant js files through the scriptmanager, but I still get the issue.
If I can't do this, how do I load the contents in via iframes, I assume I would then be able to work with each as if it was a unique page.
To add to this, I have no available sample as my code is heavily dependent upon other source code. So, I'll try my best to provide a working idea of what I'm doing;
I use this in order to stop the window partially rendering the first time I call it. When I show the windows, I attach the data and on the onclose, I destroy the window. This seems to in most cases stop me from having duplicate model ids, until I the one situation whereby I have two windows needing to be open.
Now, I've moved them out to javascript and am creating the windows as and when I need them, destroying them after so that no form fields overlap. Unfortunately, if I remove the last server side renderaction of a window, I then can't create the windows. "create is undefined".
So, three questions / problems;
How do I have multiple forms on the same page with the the same field names (they aren't the same model). ?
How do I create the windows purely in Javascript, not requiring any server side includes, I've tried getting the scripts in by including the relevant js files through the scriptmanager, but I still get the issue.
If I can't do this, how do I load the contents in via iframes, I assume I would then be able to work with each as if it was a unique page.
To add to this, I have no available sample as my code is heavily dependent upon other source code. So, I'll try my best to provide a working idea of what I'm doing;
function createAndDestroyWindow() {
var tmp = $.telerik.window.create({
modal: false,
resizable: false,
draggable: false,
visible: false
});
tmp.data('tWindow').destroy();
return tmp;
}
I use this in order to stop the window partially rendering the first time I call it. When I show the windows, I attach the data and on the onclose, I destroy the window. This seems to in most cases stop me from having duplicate model ids, until I the one situation whereby I have two windows needing to be open.