p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_howto thread: Passing Parameter

Message #1 by Me Ask <onlyu@u...> on Wed, 21 Jun 2000 10:39:39 -0400 (EDT)
Hmm, go for a hidden field and change it's value when selecting something in
a box via javascript

<script language="Javascript">
function chansel(selval){
	this.form.Selection.value = selval

<input type="hidden" name="Selection" value=""> ) 

<select .... onChange="chansel(<%=myRS("LocalDataID")%>);....">

Don't get me on the exact typing of everything, but you'll get the method.
You only need 1 submit button at the bottom of the page. Then the follow up
page is a lot easier:

SelectionBoxnr = Request.Form("Selection")

SelectedInputname = Request.Form("SelectOptions" & SelectionBoxnr)


-----Original Message-----
From: Me Ask 
Sent: Wednesday, June 21, 2000 4:40 PM
To: How To
Subject: [proasp_howto] Passing Parameter

Hi All,

Please Help!

Each Row is generating Drop down menu and Submit button. I want to update or
delete the record that I selected. How would I check input name or select

Thanks in Advance

<% myRS.MoveFirst %>
<% Do while Not myRS.EOF %>
<td height="23" valign="top" bgcolor="#F4E4FE"> </td>
<td height="23" valign="top">
<td height="23"valign="top">
<td height="23" valign="top"><%=myRS("Years")%></td>
<td height="23" valign="top">
<td height="23" valign="top">
<select NAME="SelectOptions<%=myRS("LocalDataID")%>"
onChange="this.form.SelectOption<%=myRS("LocalDataID")%>.click()" size="1">
<option value="Update">Update</option>
<option value="Delete">Delete</option>
<input name="SelectOption<%=myRS("LocalDataID")%>" type="submit"
<% 'end if %>
<% myRS.MoveNext %>
<% Loop %>

  Return to Index