Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling the Value of a Select ListBox in a table

Status
Not open for further replies.

eck2001

Programmer
May 2, 2001
1
US
I have a table on an ASP page. when the user makes a selection I need to pass that information into a variable. The problem is that I can't referrence the select object.

So how do I refference a select list imbedded into a cell.

Select id=select1

sub select1_blur()
X = select1.Value
End sub

Any help would be greatly appreciated
 
it is a little unclear what you have exactly on the ASP page. But is no problem to use a SELECT in a table:

example.asp:

dim cField1
cField1 = Request.Form("field1")

Response.Write &quot;<form method=post action=example.asp>&quot;&_
&quot;<table><tr><td><select name=field1>&quot;
Response.Write &quot;<option &quot;
if cField1 = &quot;Yes&quot; then Response.Write &quot; selected&quot;
Response.Write &quot;>Yes<option&quot;
if cField1 = &quot;No&quot; then Response.Write &quot; selected&quot;
Response.Write &quot;>No</td></tr>&quot;
response.write &quot;</table><input type=submit></form>&quot;
br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top