473,385 Members | 1,645 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,385 software developers and data experts.

refresh combo box

hi~~

i have a page that will display data from a dbase.but i don't understand why i have to refresh the page to get the value of my combo box.other fields are ok..


<td>
<select class="textField" name="highQual" >
<option value="<%=recordset("QualificationID")%>"selected> </option>
<option></option>
</select>
</td>
Mar 31 '08 #1
2 1744
jeffstl
432 Expert 256MB
hi~~

i have a page that will display data from a dbase.but i don't understand why i have to refresh the page to get the value of my combo box.other fields are ok..


<td>
<select class="textField" name="highQual" >
<option value="<%=recordset("QualificationID")%>"selected> </option>
<option></option>
</select>
</td>
Not sure exactly whats happening on your page. More code would help.
However offhand I am seeing you are setting the value of the option equal to your dbase value, but you don't have an actual text option set up to show up

so:
Expand|Select|Wrap|Line Numbers
  1. <td>
  2. <select class="textField" name="highQual" >
  3. <option value="<%=recordset("QualificationID")%>" selected><%=recordset("QualificationID")%></option>
  4. <option></option>
  5. </select>
  6. </td>
  7.  
Also another thought (but again since I cant see all your code I dont know) is that you are doing a look up of some kind with that QualificationID? If that is the case you would have to loop through all values normally populated in the drop down until you came across one that was equal to your dbase value.

like this:
Expand|Select|Wrap|Line Numbers
  1. for x=0 to dropdownrecordset.recordcount
  2.      if dropdownrecordset("QualificationID") = recordset("QualificationID") then
  3.            <option value="<%=recordset("QualificationID")%>" selected><%   =recordset("QualificationID")%></option> 
  4.      else
  5.           'continue to populate drop down values (without selected property)
  6.      end if   
  7. next
  8.  
Apr 1 '08 #2
hi~~thanks..huhu...such a silly mistake..it's bcoz i just put the value without the text option..

should be more careful next time~
Apr 3 '08 #3

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

Similar topics

1
by: Rob | last post by:
Hi, I have a application in Access 2000.The subform has a few combo boxes.These are for groups,divison ,names and department respectively and each combo box is dependent on the value selected of...
2
by: Lucinda Roebuck | last post by:
I'm using Access 97 on a Windows XP computer. The combo box on the form "form1" will not refresh after a new name is added to the list. The "limit to list" properties for the combo box is set to...
1
by: jen | last post by:
I have two combo boxes, Field A and Field B. When I select am item in Field A, Field B updates, dependant on Field A. I have this working correctly, however, I'm getting stuck on the display of...
7
by: Doug | last post by:
Hi I have a combo box (A) that populates a following combo box (B) based on a selection. The selection from the first combo box (A) initiates an OleDbDataAdapter routine that extracts the...
2
by: Grey | last post by:
i have one combo box in the asp.net form. user can add item in the combo box from another web form. my question is when the user click button to add new item into the combo box, is it possible only...
3
by: marik | last post by:
Hi, people. I have a question: Can somebody link me to a simple javascript piece of code, that allows me to get input from a combo box and set the refresh interval of the page to be that...
6
by: AppDev63 | last post by:
I've been struggling with a form. On the left side of the form I've got data from a table of invoices, and on the right side I've got a combo box with data from a table of payments. The user scrolls...
4
by: lulu123 | last post by:
here's my problem 1) rowsource .RowSource = "select distinct , " & "from Projects " & " where =" & Me! I have the above code, and it works fine. however, i want to make the combo box in...
2
by: DavidPT | last post by:
I have setup a form that also has a subform in it. The form just shows the date and the subform holds all the other information such as Name, Task, Hours and Comments. Three of these options are...
5
by: bkberg05 | last post by:
Hi - I have a combo box field on a form. The field is required (can't be left blank). Occassionally a user will come to the field and the combo box will not contain the desired record. So I added...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...

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.