Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
| Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 3rd, 2008, 02:42 AM
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.




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass gridview selected row msbsam ASP.NET 2.0 Basics 1 March 4th, 2008 09:17 AM
deleting records based on selected checkbox lakshmi_annayappa Javascript 3 September 6th, 2007 02:22 AM
how to pass an array in jsp to other js? lch Javascript 5 April 18th, 2006 06:56 AM
intersecting array values ASP/VB or even js sniffer Classic ASP Professional 0 October 19th, 2005 06:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.