Select List Box From Array
I have a string that was populated from a listbox. Now I want to bring up the record again for edit and want the listbox to have those records selected ONLY. I am close I think. Currently, it selects all records.
<%
HearingIssues = RS3(0)
HI = Split(HearingIssues, ",", -1, 1)
For i = 0 to ubound(HI,1)
sString = Instr(HearingIssues,HI(I))
if sString = 0 then
%>
<option value="<%= HI(I)%>"><%=HI(I) %></option>
<% else %>
<option value="<%= HI(I)%>" selected><%= HI(I) %></option>
<% end if
next
View Replies
ADVERTISEMENT
I have a select list which get populated from com but i option value ALL is hard coded on the pageWhen any value is selcted from the list box and form is submitted pages refreshes with the value as selected in the drop down but if All is selected the page ref but All doesnot get selected.
<LABEL for="MyList"></LABEL>
<SELECT id="MyList" name="MyList">
<%For icount=0 To intmyCount%>
<OPTION
<%if Trim(arrmyType(icount,0)) =strmytype Then%>
SELECTED
<%end if%>
VALUE="<%=Trim(arrmyType(icount,0))%>"><%=Trim(arrmyType(intCtr,1))%>
<%Next%>
View Replies
View Related
What i would like to be able to do is have two listboxes side by side, one will have all of the main categories and the second will have all of the sub categories in it.
I populate the first list by using this code:
<option value= "<% = rs("cat_id") %>"><% = rs("cat_name") %></option>
Now what i would like to do is when the user double clicks say the second item on the list, the listbox next to it will display all of the items that are under the main category they just double clicked on
View Replies
View Related
I have created a webpage with a form written in javascript for a user to enter information. Part of this form requires the user to type in information and then add it to a list, which is of the type <SELECT>. When the user submits the form, I want all the entries in the SELECT list to be entered into the database. If I use the command Request.Form("name"), where "name" is the name of the SELECT field, only the selected entry is retreived. I need to retreive all entries in the list. Does anyone know how I can do this?
View Replies
View Related
I have an old application ( pre-VB5) that I need to add a select/option list to. This is an edit program so the values for the form will be retrieved from a database. How do I set the value of the dropdown with the value from the database. The value in the database is either new, trial, maint., employee, beta, or null. I need to set the dropdrown to one of these values. An example of the select;
<td>
<select name="ordReason">
<option></option>
<option value="New">New</option>
<option value="Maint.">Maint.</option>
<option value="Trial">Trial</option>
<option value="Employee">Employee</option>
<option value="Beta">Beta</option>
</select>
</td>
View Replies
View Related
I have two list boxes . User can select multiple values from the lists. Is there a way I can force that the user can select from only one of the list boxes? Can I associate the radio button with the list so that as soon as user selects the radio button the other list box turns grey(not letting the user to select anything from that list).?
View Replies
View Related
I have the following list
<SELECT NAME="">
<OPTION VALUE="">Series C</OPTION>
<OPTION VALUE="">Series M</OPTION>
<OPTION VALUE="">Series F </OPTION>
<OPTION VALUE="">Screwjack</OPTION>
<OPTION VALUE="">Roloid Gear </OPTION>
</SELECT>
However i want to change the font size and typw within the list is there a way to style the font inside such a list?
View Replies
View Related
I need a piece of ASP code which will output the values in a select box no matter what their order. This is for re-arranging items in the database.
I have a page which displays al relevant rows from the database in a select box with a javascript function to move the items up and down in the box.
However, I then need an ASP output of the order of the box. Currently, when i request.form("ord"), I get the values "1,12,36,37,[etc]" but only in the order they are in when the first page loads. It does not re-arrange the items if they have been re-arranged using the javascript function.
View Replies
View Related
I have managed to populate a dropdown box with a list of all files in
the current folder and even filtered them by the extension so that it
only displays the .mdb files. However, the menu seems to be holding
all of the items in the folder and displaying only the .mdb.
This
seems to be a problem with the way I am defining the size of the
array. If I add my .mdb filter to the array loop I get an 'out of
range' error for the n variable?? Can anyone suggest a solution??
Code:
View Replies
View Related
I am returning a list form a db: this could be 1,2,3,4,12,67,1,2,34 so basically I am looking at how to remove the duplicates before doing another select. I saw a thread here with a funciton to do this bu it does not seem to work.
View Replies
View Related
How to make multiple select in dropdown list box using asp and access.
View Replies
View Related
I created 3 select lists :
One is a dropdown style that has options in it like : location,date,usage
Second one is a select list that I filled with value from a vbscript that get all groups on my domain.
Third one is a list that gets automatically generated when user select an option from the first one I also got 2 input button that allows the user to move item from list 2 to list 3.
Now here's the deal I want a way, maybe a button, that would circle around all the options in list3 and insert each of them in my DB. Code:
View Replies
View Related
I first retrieve the values stored in a session variable (where I have stored an array). Then I assign the session variable to a local array called "myarray".
Assume that "myarray" now contains 5 records. What would the code look like if I want to create a loop that transfers the 5 values from "myarray" into a select box/dropdown list?
How is that done?
View Replies
View Related
I would like to know if it is possible to fill in an access table through a select list inside an APS 3 web page. If yes, how ?
View Replies
View Related
I would like to use ASP to populate a select list from a comma delimited txt file.....
View Replies
View Related
I am trying to learn and use good DHTML concepts and code (assuming they are needed). My current issue concerns how to handle this situation.
I have a Select List box which displays values based on what value is selected in a dropdown list. For example, my dropdown list contains a class name, and the Select list contains all of the students who are registered for that class.
So what I would like to occur, is when the user changes the class from the dropdown box, the Select List is re-created displaying the students who are enrolled in that class.
I thought I could do this without having to reload the page (with DHTML) but here is my problem. Code:
View Replies
View Related
How can i list out all the email address into my website from the hotmail caontact list? i am successful log in into the yahoo contact list by using serverxmlhttp and list out all the email address from the page source, but i could not access to hotmail by using the serverxmlhttp. Is any other methos can list out the email address from hotmail contact list?
View Replies
View Related
I dump the entire recordset into an array:
If not rs.EOF Then
aEmp = rs.GetRows()
Contents of the array are in this order:
EmpID,EmpName,Indent,Sub_ID,Lft,Rgt,MgrID, LastName
This query sort on the basis of Lft and Rgt columns.
The name of the array is: aEmp.
My question here is how can I get only the LastName from the aEmp array into another array so that I can sort the names alphabetically and then display the employees in the alphabetical order.
Or is there is another way I could this by using the same array while keeping the lft and rgt sort of the query? If I sort based at the SQL query level, I can see the names sorted by the lft, rgt and lastname, but since the lastname is at the end of the sort list - it does not appear alphabetically.
View Replies
View Related
In working with arrays, I have found that I am unable to dimension and array
with a variable that has an integer value but I can redimension one this
way. I haven't see any information that tells me if this is a requirement,
although it appears to be because I get an error if I try it.
Ex.
Dim b
b = 10
Dim a(b) ' this errors out but
Dim a() ' this
Redim a(b) ' works
Code:
View Replies
View Related
I want to create a new array called arrNames2 and copy contents of arrNames to arrNames2.
I then want to loop through my db and add more names (while going through the loop) to arrNames2. What is the best way to do this? Do I have to keep redim the array wehn I add more names?
View Replies
View Related
I have written some code which should dynamically build a table which is then populated with questionas and possible answers. The format of the answers will vary ie they may be in the form of a radio button which will be rated from 1-5, checkbox or a selectbox.
The first problem I have is if I do not comment out <select></select> I get an error message saying the page can not be found. when I do take it out I get asp timeout. Code:
View Replies
View Related
I have a form with 3 list boxes, in the second list box i have created a select all button to enable users to select all items.
but when i click select all button an error message is returned stating that "Object doesn't support this propery or method"
here is my code.
<script language=javascript>
function selectall(sel) {
var len = sel.length;
for ( var i=0; i<len; i++)
{
sel.options[i].selected = true;
}
}
</script>
<input type="button" name="selectall" value"select All" onclick="javascript:selectall(listboxname)")
View Replies
View Related
i have a list box with allot of values in it. How do i submit the item that is selected in the list box? ive tried a few but i cant get it working. Here is what i tried:
Document.form.search.value = document.form.list1.value
View Replies
View Related
in select box we can select only values...can not change that value in list itself...
i wanted to give my user in edit form they can chnage the value in list itself...
any property of select box..or some codeing ? Code:
View Replies
View Related
i know how to get a listing of files in a specific directory, but i want to get a list of all files in all subdirectories of a specific directory (not virtual). on my server i have e:picturesweb.
in this folder there is male and female directories and in those directories there are also subdirectories. i want the page to create a value for each file and directory so that it can be submitted to another page that will ftp the pictures to a remote site. (yes I have the ftp script ready to go)
something like:
picname1 = john1.jpg
picdir1 = male/
picname2 = sally.jpg
picdir2 = female/
View Replies
View Related
I have a webpage with a list box. I wish to populate it with values from my database when the page loads, these values are just the primary key.
View Replies
View Related
I've created one list box and a button The query is: After clicking the button the action done on the same page with the values selected. How to solve this ?
View Replies
View Related
Does anyone know how to tell which items in a multiple-select listbox are selected?
View Replies
View Related
i want to excute given logic
select * from Product_Table where Product_Code in
ARRAY
i.e i want to select Product_Code from VB array and not from a query
is it possible.
View Replies
View Related
I know I can do this programatically using a loop but I thought there might be
some easier or more effective way.
I am trying to invert an array.
i.e.
array1 = 1,2,3,4,5
but I want to get
array2 = 5,4,3,2,1
Is there something like array2 = invert(array1)?
View Replies
View Related
I have to following code:Code:
dim arrRes(9),getal,som
arrRes=Array(4,4,4,4,4,5,5,5,5,5)
for getal=0 to 9
som=som+arrRes(getal)
next
response.write("Het klasgemiddelde is " &som/10)
I get a type not match error on the second line
View Replies
View Related
I have a page in my admin system where the user can edit products they
have added. The problem I am having is with Related Products. These are
all listed in a multiple list. What I need to do is have those selected
when the product was added, already be highlighted in the multiple list
on the product edit page. Here is my post from another forum.
Code:
View Replies
View Related
For some reason, when I try to run the following array, I'm getting an
error:
dim cat(0)
cat(0)="0407"
cat(1)="0102"
'I will be adding more to this array, but just trying with two for
starts.
for counter = 0 to 1
itno=cat(counter)
'I get an error when it runs through this function
Function rightvar(theVar,lengthNeeded)
Dim sResult
sResult=theVar
if Len(theVar)< lengthNeeded then sResult= String(lengthNeeded -
Len(theVar)," ")& theVar
rightvar=sResult
End Function
Can someone help me understand why?
View Replies
View Related