View Single Post
  #1 (permalink)  
Old June 3rd, 2008, 02:42 AM
yasinirshad yasinirshad is offline
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.


Reply With Quote