Can I pass data via window.opener to dynamic page
-
I have parent dynamic HTML page with a form and random number of input fields in which I would like to insert predefined data from child help window. I use Javascript to open child window, where I display possible values, which I send to parent window with a click. That works fine, if I have fixed field names in parent window - via window.opener.document.myFormName.Variable1.value I assign value to Variable1. But now I have random number of variables, and therefore random names. I can send the name of the variable to my child window, but don't know how to use it, to assign specific data to that variable. function Izbor(a, b) { window.opener.document.Vprasalnik.a.value = b; window.close() } b is the value, that I assign, and a is the name of the variable, that I want to assign this value to. Is this even possible? Thanks for the help, Marcel
-
I have parent dynamic HTML page with a form and random number of input fields in which I would like to insert predefined data from child help window. I use Javascript to open child window, where I display possible values, which I send to parent window with a click. That works fine, if I have fixed field names in parent window - via window.opener.document.myFormName.Variable1.value I assign value to Variable1. But now I have random number of variables, and therefore random names. I can send the name of the variable to my child window, but don't know how to use it, to assign specific data to that variable. function Izbor(a, b) { window.opener.document.Vprasalnik.a.value = b; window.close() } b is the value, that I assign, and a is the name of the variable, that I want to assign this value to. Is this even possible? Thanks for the help, Marcel
please do not repost your question