473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Drop down box hell

I have a static drop down box on a page. I have another an asp page that collects the data. It manages to collect all the combo boxes, but i am having problems trying to retrieve the drop down box selections. Ive tried nearly every way on forums but it still doesn't seem to recognise that there is a drop down box there. Below is the asp code:

<%@ Language=VBScript %>

<%
Dim splChecks
Dim intChecks, i
Dim int
Dim Cath_type, Insertion_site, Skin_prep, PP_eqip, Hand_hy, Aseptic_tec, Dressing, SDoS, Doc, data_source, con, sql_insert
Dim Ward, Month, Year, Week

Month = Request.Form("Month")
Response.Write(Month)


splChecks = Split(request.form("cb0"), ",")
intChecks = UBound(splChecks)
Cath_type = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb1"), ",")
intChecks = UBound(splChecks)
Insertion_site = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb2"), ",")
intChecks = UBound(splChecks)
Skin_prep = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb3"), ",")
intChecks = UBound(splChecks)
PP_eqip = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb4"), ",")
intChecks = UBound(splChecks)
Hand_hy = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb5"), ",")
intChecks = UBound(splChecks)
Aseptic_tec = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb6"), ",")
intChecks = UBound(splChecks)
Dressing = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb7"), ",")
intChecks = UBound(splChecks)
SDoS = ((intChecks + 1) * 10)

splChecks = Split(request.form("cb8"), ",")
intChecks = UBound(splChecks)
Doc = ((intChecks + 1) * 10)

data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("infection.mdb")
sql_insert = "INSERT INTO tbl1a_IC (Month, Cath_type, Insertion_site, Skin_prep, PP_eqip, Hand_hy, Aseptic_tec, Dressing, SDoS, Doc) values ('" & Month & "', '" & _
Cath_type & "', '" & Insertion_site & "', '" & Skin_prep & "', '" & PP_eqip & "', '" & Hand_hy & "', '" & Aseptic_tec & "', '" & Dressing & "', '" & SDoS & "', '" & Doc & "')"

' Creating Connection Object and opening the database
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert

' Done. Close the connection
con.Close
Set con = Nothing
Response.Write "All selections were successfully entered"
%>

And the drop down box is just simple html:

<font color="#336699" size="2"> <select size="1" name="Month" tabindex="2">
<option>-Please Select Month-</option>
<option value=0>January</option>
<option value=1>February</option>
<option value=2>March</option>
<option value=3>April</option>
<option value=4>May</option>
<option value=5>June</option>
<option value=6>July</option>
<option value=7>August</option>
<option value=8>September</option>
<option value=9>October</option>
<option value=10>November</option>
<option value=11>December</option>
</select></font></td>

I wonder if anyone could explain whats happening to me.
Jan 28 '08 #1
1 1165
CroCrew
564 Expert 512MB
Hello joefrost,

The “word” Month is a function and can’t be used as a variable name. Change your form element name from:

name="Month"

To

name="xMonth"

Then in your scripting code block from:

Month = Request.Form("Month")
Response.Write(Month)


To

Month = Request.Form("xMonth")
Response.Write(xMonth)


Give that a try.
Hope it helps and let us know if there is more to your problem~
Jan 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: PT | last post by:
I got a form with many text boxes, checkboxes and 3 drop downs. From that 3, 2 are dependant. I can choose one drop down, and the next drop down should display the dependant values of the first...
2
by: ehm | last post by:
I am working on creating an editable grid (for use in adding, deleting, and editing rows back to an Oracle database). I have a JSP that posts back to a servlet, which in turns posts to a WebLogic...
1
by: Dan | last post by:
This is one that has me stumped and I need an expert's input. Any ideas why the values from the second script-generated drop down list isn't recognized by the script to add time values to the...
4
by: shlomi.schwartz | last post by:
Hi All, Is it possible to open the select (ComboBox) drop down list by script?
3
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
7
by: callawayglfr | last post by:
I am building a database in access where I have a drop down box that relates to a text box, that part I have working but when someone selects information from the first drop down I need it to limit...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
3
by: penny111 | last post by:
Hi there, For my application, i need to have 3 drop down lists 1. drop down list of folder names 2. drop down list of documents in the folder selected 3. drop down list of instances of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.