Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_discuss thread: ASP/Javascript


Message #1 by "sebastian weerakkody" <sebastian.weerakkody@p...> on Mon, 21 May 2001 15:02:47
I have a list box on the bowser side that allows multiple selections.

I would like to reference this list box on the server side and 

determine the selections made.

I am using ASP/jscript on the server side. Are there methods available

on the the Request object that I can use to check for the selections

made on the list box (ie: like on the bowser side functions such as:



	rc_yy_item = document.createcr.rc_yy.selectedIndex;

	rc_yy_value = document.createcr.rc_yy[rc_mm_item].value; 



I appreciate any help I can get. Any sample code will be greatly 

appreciated.



Thanks a lot



Alex
Message #2 by Scott Watermasysk <swatermasysk@C...> on Mon, 21 May 2001 10:13:34 -0400
Just request it by name: request.form("ListBoxName") or

request.querystring("ListBoxName") depending on whether you use get or post.



If your list box has multiple selections you will need to parse the returned

string.



You can use the count method to find out if there is more than one value. 



i = request.form("ListBoxName").count

Select Case i

Case 0 

'Empty...no values

Case 1

 sString = request.form("ListBoxName")

Case Else

 For intLoop = 1 to i

	somestringorArray = request.form("ListBoxName")(intLoop)

 Next

End Select



-Scott



-----Original Message-----

From: sebastian weerakkody [mailto:sebastian.weerakkody@p...]

Sent: Monday, May 21, 2001 11:03 AM

To: asp_discuss

Subject: [asp_discuss] ASP/Javascript





I have a list box on the bowser side that allows multiple selections.

I would like to reference this list box on the server side and 

determine the selections made.

I am using ASP/jscript on the server side. Are there methods available

on the the Request object that I can use to check for the selections

made on the list box (ie: like on the bowser side functions such as:



	rc_yy_item = document.createcr.rc_yy.selectedIndex;

	rc_yy_value = document.createcr.rc_yy[rc_mm_item].value; 



I appreciate any help I can get. Any sample code will be greatly 

appreciated.



Thanks a lot



Alex



swatermasysk@c...



  Return to Index