p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   .NET Framework 1.x (http://p2p.wrox.com/net-framework-1-x-203/)
-   -   using js to pass selected checkbox values (http://p2p.wrox.com/net-framework-1-x/68553-using-javascript-pass-selected-checkbox-values.html)

yasinirshad June 3rd, 2008 02:42 AM

using js to pass selected checkbox values
 
Hi,
I have a parent form and a child form.. I have a checkboxlist in my child form. Users can select multiple values from checkbox list and on clicking button i want to pass selected values to parent form. Below is my code which works fine for passing value from child form to parent form (for the value entered in textbox) by clicking on button in child form textbox value is passed to parent form and child form closes, but how to pass multiple selected values (selected from checkboxlist) from child to parent form.
I think loop shd be used..can anyone pls get me the code ...
child Form:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim scr As String = "<script language=javascript> function Done() { var lName=document.getElementById('txt_division').valu e; var ret= new Array(lName); window.opener.update(ret); window.close();}</script>"
Page.RegisterClientScriptBlock("done", scr)
End Sub

this is my js function am using in above code:
"<script language=javascript> function Done() { var lName=document.getElementById('txt_division').valu e; var ret= new Array(lName); window.opener.update(ret); window.close();}</script>"

Thanks to help with code / refer articles.




All times are GMT -4. The time now is 12:52 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.