parent page
-
Hi, I've a pop up page, in this one, i get the values that i've to put into his parent page, but i don't know how to set the value in the text boxes in parent page. Can u hel me? thanks
Yes. you need to use the following javascript: window.opener.document.form1.txtPrice.value = YOURVALUE; You can change 'txtPrice' for the ID of the form object you want to update. NB: The form on the parent page must have its ID value set to 'form1' or whatever you wish to call it. Lee
-
Yes. you need to use the following javascript: window.opener.document.form1.txtPrice.value = YOURVALUE; You can change 'txtPrice' for the ID of the form object you want to update. NB: The form on the parent page must have its ID value set to 'form1' or whatever you wish to call it. Lee
-
Thanks, I had the same page in asp, but i wanted to know if i can set the values in the code behind directly to the parent page or javascript is the only way.
I remember spending a long time looking at this. Because the code behind is run on the server you would have to post the child back to the server and setting maybe a session variable. To then get that value to the parent would mean setting up something like a HTTP handler to do a background update to the parent. It would mean a lot of coding for a simple task. It's a lot faster to use good old javascript.