My experience is to implement 2 or 3 use cases of this popups and study the common behaviour and refactor the code base to support more generic cases. I am not sure whether the following can help you but I would use a Array to carry the fields and value to and fro the popups.
var map = new Array(); map["field1"] = document.form1.field1.value;//this document is on the window.openner map["field5"] = document.form1.field5.value; map["field7"] = document.form1.field7.value; popup(map); on popup window, name the field according to the array, after search, var map = this is the map passed from the window.opener; map["field1"] = document.form1.field1.value;//this document is on the popup map["field5"] = document.form1.field5.value; map["field7"] = document.form1.field7.value; window.openner.closeWindowWithMap(map); Regards On 11/20/05, Laurie Harper <[EMAIL PROTECTED]> wrote: > > Preston CRAWFORD wrote: > > Yeah, no easy solution for this. The more I think about it the more it > > occurs to me that what we're attempting to do is setup a common code > > base for updating any N number of forms using Javascript. The plumbing > > for this is easy and obvious (I listed it earlier). But making it a > > single code base that can be applied to any form is going to be > > impossible. We're going to have to have a separate JSP for the popup for > > each form. I can't think of a way to make the pop that's being used in > > the form dynamic, without burying a great deal of logic in an Action. Or > > worse, actually submitting the form (but not submitting it to save), and > > then refreshing. So essentially having control logic in the action as to > > what kind of submission (as we leave the page and go to the provider > > search page) was just performed. I'm thinking this is going to end up > > being multiple actions, multiple JSP pages, multiple action entries in > > struts-config. > > That sounds horrendous, and I'm not sure why you'd need it. I might be > missing something, but why can't you write one Javascript function that > knows how to serialize a form into an object and pass it to a callback, > and just include that function in each popup? > > L. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Yujun Liang [EMAIL PROTECTED]