Outline ·
[ Standard ] ·
Linear+
selection of combo box in asp
|
shinchan^^
|
Feb 6 2006, 04:44 PM
|
|
CODE <select Name="fruitName"> <%do while not resultSetFruit.eof=true Response.Write "<option value=" & resultSetFruit("FruitName") & ">" & resultSetFruit("FruitName") & "</option>"
resultSetFruit.MoveNext loop %> </select>
|
|
|
|
|
|
shinchan^^
|
Feb 6 2006, 05:08 PM
|
|
make a submit type button then the page form action post back to same page
asp top page detect post back and fruitname and update table
or use a javascript function detect the combobox change, and post back then do the update
i think use button better
|
|
|
|
|
|
shinchan^^
|
Feb 6 2006, 05:13 PM
|
|
1st) <FORM NAME="fmMain" ACTION="Fruit.asp?fruitName=<%=fruitName%>" METHOD="post" TARGET="_top">
2nd) <input value ="View Bill" type="submit" name="bttSubmit" />
3rd) 'Request balik the fruitname on the top page <%@ LANGUAGE="VBSCRIPT" %> fruitName= Request("fruitName")
if fruitName="" then Response.Write "<script>alert('Please Select The Fruit Type.')</script>" else ' SQL UPDATE STATEMENT HERE ' ' '
end if
%>
|
|
|
|
|