| | Discussion and Rate this Resource Overall Rating: 4.4 | ja928 on Sep 4, 2003 at 9:23:40 AM | Rating: 4 | civory, Instead of just doing the Response.Write, use a Replace()
Dim theDefault theDefault = Request("whatever value is selected")
Dim sDropDown sDropDown = BuildListBox("SELECT","States","False",0,"",oRS,"state","state_name")
Replace(sDropDown, "VALUE=""" & theDefault & """", "VALUE=""" & theDefault & """ SELECTED"
| | civory on Sep 3, 2003 at 1:55:10 PM | Rating: 4 | | Is it possible when reloading the page to have the item selected display in the listbox, like the select Tag in HTML. | | hendrix on Mar 8, 2002 at 5:26:58 AM | Rating: 4 | Very useful script but I get an error if my sql returns a value that isn't an Integer. Does anyone know how to solve this??
The error is:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal. | | frocco on Sep 25, 2001 at 7:13:13 AM | No Rating | How can I position in the list to the value I currently have in my database?
1,Apple 2,Orange, 3,Pear
if database field has a value of 2, I what to show the list with the default of orange.
Thanks
| | Magnum on May 27, 2001 at 11:15:36 PM | Rating: 5 | This is a very useful article. It works for a drop down list box as well as Radio buttons, check boxes, and multi select list boxes. To make it properly work, the function call should be as follows:
Response.Write BuildListBox("input","cbpubs",true,8,"",rstPubs,"pub_id","pub_name") |
More Ratings/ Comments
To rate and comment on a resource, you must first logon.
If you are not registered, please register yourself to become a member of the SiteExperts.community.
|