| | |
Using two dropdown forms in an ASP page
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2007
Posts: 1
Reputation:
Solved Threads: 0
I'm having a terrible problem using two drop-down forms in the same asp page. No matter what, the values for the second form are not passed to the SQL database. I've confirmed this by commenting out the first form and then the second form works fine. I'm sure it is something foolish I'm missing but can anyone help?
ASP Syntax (Toggle Plain Text)
' ChassisID Dropdown Menu Dim strChassisbuildSQL Dim rschassisbuilddata Dim strChassisMatchSQL Dim rschassismatchdata WriteLine "<tr><td>ChassisID:</td>" WriteLine "<td><form><select name='dbtChassisID'>" strChassisbuildSQL = "SELECT ChassisID, Nickname FROM Chassis ORDER BY Nickname" Set rsChassisbuildData = cnDB.Execute(strChassisbuildSQL) If strChassisID = "" then Writeline "<option value=''></option>" Else Writeline strchassisID strChassisMatchSQL = "Select Nickname from Chassis where ChassisID = " & strChassisID Set rsChassisMatchData = cnDB.Execute(strChassisMatchSQL) Writeline "<option value='" & strChassisID & "'>" & rsChassisMatchData("Nickname") & "</option>" rschassismatchdata.close end if Do until rschassisbuilddata.EOF Writeline "<option value='" & rschassisbuilddata("ChassisID") & "'>" & rschassisbuilddata("Nickname") & "</option>" rschassisbuilddata.MoveNext Loop rschassisbuilddata.close WriteLine "</select></form></td></tr>" ' END CHASSISID DROPDOWN MENU WriteLine "<tr><td>Bay:</td>" WriteLine "<td><input type=text size=40 " _ & "maxlength=40 name=dbtBay value=" _ & DQ & strBay & DQ & "></td></tr>" ' BEGIN MODULE DROPDOWN MENU Dim strModulebuildSQL Dim rsModulebuilddata Dim strModuleMatchSQL Dim rsModuleMatchData WriteLine "<tr><td>ModuleID:</td>" WriteLine "<td><form><select name='dbtNickName'>" 'Start Form and Assign value dbtNickName strModuleBuildSQL = "SELECT ModuleNameID, ModuleNickName FROM ModuleName ORDER BY ModuleNickName" ' SQL string to poll ModuleName table for available Modules Set rsModuleBuildData = cnDB.Execute(strModuleBuildSQL) ' Set SQL string If strNickName = "" then ' If there is no existing value for the module name, leave a blank option at top Writeline "<option value=''></option>" Else ' Writeline strNickName strModuleMatchSQL = "Select ModuleNickname, ModuleNameID from ModuleName where ModuleNameID = " & strNickName Set rsModuleMatchData = cnDB.Execute(strModuleMatchSQL) Writeline "<option value='" & strNickName & "'>" & rsModuleMatchData("ModuleNickName") & "</option>" rsModuleMatchData.close end if Do until rsModuleBuildData.EOF Writeline "<option value='" & rsModuleBuildData("ModuleNameID") & "'>" & rsModuleBuildData("ModuleNickname") & "</option>" rsModuleBuildData.MoveNext Loop rsModuleBuildData.close WriteLine "</select></form></td></tr>" ' END MODULE DROPDOWN MENU
![]() |
Similar Threads
- Retriving data from excel sheet into an asp page (ASP)
- problem in javascript coding in asp page (ASP)
- How do i print asp page on client side "only the contents" (ASP)
- How to use two forms in asp (ASP)
- Retrieving values from pop up and displaying into asp page (ASP)
- How to Create TIME STAMP in ASP page (ASP)
- New ASP page (ASP)
Other Threads in the ASP Forum
- Previous Thread: when to use session and cookies variables ?
- Next Thread: how to get network login user name
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





