Listbox With Two Columns?
I want to make a listbox which will show the results of two fields (the ID and the Name) of one table , but the one field (ID) will be the one to pass.
View RepliesI want to make a listbox which will show the results of two fields (the ID and the Name) of one table , but the one field (ID) will be the one to pass.
View RepliesI was wondering if you could help me with the following problem. I have 2 listboxes in my
webpage, 1 has cities, and the other lists the streets of the city from the first listbox.
When I click on a city, I want the 2nd listbox to populate with all streets in the city. The city and streets are saved in a database, so when the user selects the city, I will run a query on the database and populate the 2nd listbox with all streets.
How can I do this with normal ASP? I know how to do this with ASP.NET, but don't know how to activate this with normal ASP?
I want to display the results from my database in 2 columns.any easy tutorials or article out there? havent found any easy so far
View Replies View RelatedHow do I find out how many columns exist in a SQL Server DB table before displaying the records of that table?
Also how do I get all the column names as an array so that I can seperate each column using the Split function?
I have a small doubt, my access database has been moved to SQL Server. Now I had some columns say [Where NoP] and similar many such columns. Are these columns going to work, since some of my queries are returning error. When i change the column name to say WhereNoP, it works fine, but in that case, I have to check around 300 forms where the column name is mentioned. So any clues to make such column types work.
View Replies View RelatedIs it possible to change the selected default option in a listbox on the 2nd page to the option selected in a listbox on the 1st page which ..i.e preventing the selected option from changing to the default option on the 2nd page (both the list boxes have the same value)...i am having a listbox which gets populated from a database using ASP.
View Replies View Relatedcan't seem to get this ADOX code to add columns to existing Access 2000
table what's missing ?
Sub AddTableFields()
Set tbl = Server.CreateObject("ADOX.Table")
set cat = Server.CreateObject("ADOX.Catalog")
cat.activeConnection = conn
With tbl
.Name = "events"
Set .ParentCatalog = cat
.Columns.Append "MaxEntries", adInteger
.Columns.Append "CurrentEntries", adInteger
End With
cat.Tables.Append tbl
Set tbl = Nothing
Set cat = Nothing
End Sub
I have a SQL 2000 table with data I display in three columns. The code
I am using sorts the data horizontally but I need it sorted vertically.
Here's the code I am using. Perhaps somebody can help me find a way to
modify it.CODE
response.write "<table width='100%' cellpadding=1 cellspacing=0>"
if not oMain.eof then
count = 0
do while not oMain.eof
if count mod 3 = 0 then
'there are 3 in the current row, so end the row and start a new
one...
Is there a way to make dynamic columns? I'd like the data from one field to be the column in a dynamic table. What i'm trying to do could be compared to a pivot table in excel.
View Replies View Relatedthere are many ways to make this happend but what is the best way of printing sql records in non divided number of columns-say 5 columns? say you got 10,000 names and you want to print it in 5 columns, that is a poor drawing of 12 records in 5 columns:
1 2 3 4 5
6 7 8 9 10
11 12
...every one of this 12 is a name
printing a name + checking if is there some ditails reffered to this name in other table column...
I access an access-table by this SQL-ADO-string:
SQLGetInfo1 = "SELECT * FROM kalender ORDER BY year DESC, month DESC, day DESC;"
Set rsGetInfo1 = DBConn.Execute(SQLGetInfo1)
Now I want to drop all the names of the columns, that is the field names, into a 1-dimensional array (or perhaps some ordinary strings, doesn't matter), but how do I do that? I tried with some rsGetInfo1.Fields.Name() and stuff like that, but the bottom line is, I don't really know how to fetch that property.
Normally I do a query, and loop through the records. Is there a way to loop through the columns of each record?
View Replies View RelatedI have to fix an asp database site, that may or may not have ever worked properly. I keep getting the following error:
"ADODB.Recordset error '800a0cc1' Item cannot be found in the collection corresponding to the requested name or ordinal."
I have researched and found that this is happeneing most likely because the script is requesting a field that doesn't exist in the database (maybe a mis-spelling). I can't find the code to display a list of columns in the database.
How can I know the number of columns of the .csv files? I want to import them to the database.
View Replies View RelatedJust like we have Recordset.GetRows() method to retrieve all the rows of the recordset, do we have anything that retrieves only the column values for a specific column from the recordset. I want to transfer all the contents of a column field by doing this into an dynamic array in a single go. instead of using loop statements to fill the array.
View Replies View RelatedI want to display a table with 3 columns only. The cells will be populated with database fields requested from a queryString .
The actual Access field value is either "Y" or null. If a "Y" value is true then I want the Field.Name to be displayed.
Anyway, the table has 40 possible columns so I'd like to limit it to display
only 3 columns: I can generate the field names below: Code:
Rather than doing this:
<A HREF="editpatient.asp?ID=1>View</A>
Can i do something like this instead? - and make it work
<A href="EDITPATIENT.asp?ID=" & LISTBOXPATIENT & ">View</A>
where LISTBOXPATIENT refers to a database populated listbox
The idea being that when the user is completing a form they can look up additional data on a patient by clicking the hyperlink next to the listbox.
I have a drop-down with 40 option values and only one option should be selected of the 40 options. The list size should be 1.
When I click on the list, it drops down 30 options (a very long list) with a scrollbar for the last 10 options.
Is there any way, when I click on the list it drops down only 5 options (as if the list is of size 5) and allow a scrollbar to browse the remaining 35 options.
Code is:
<select name="deplist" id="deplist"
<option value="Commerce">Commerce</option>
<option value="Instru">Instrumentation</option>
... similar such 38 options
</select>
I have 6 list boxes and it may or may not have data from db to get fill in.
so what happens is whatever has data that comes to the size of the maximum length of the data in that list box and others comes as very small width as there are no data.
but what i want is all list boxes width should be of moderate size.
how can i make those empty list boxes appear as moderate size.
I dont have an option to put an default item in the db to load with that
Does anyone know how to make a form take you to different pages depending on what is selected from a list box ? im using asp /sql / and dreamweaver ..
View Replies View RelatedIm new to asp and I'm having trouble with listboxes.
I have two listboxes, the first is populated from a database and I need to fill a second listbox with items from the database that are dependant on what was selected in the first list box.
I want to select a value from a ListBox, and depending on that value, if it is the right one, it disables a textbox? Can this be done with Javascript?
View Replies View Relatedthe listbox on the left contains the names of employees
the listbox on the right contains the names of employees selected from the listbox on the left (ie by hitting the buttons they move across)
when I submit the form which those two list boxes sit on - I want to access the list on the right
currently on use valus=request.form("RListBox") - then I split the returned value from valus etc - however this ONLY works if I select each item in the listbox (making each entry highlighted)
what I would like to do is itinerate through each item in the listbox and get its (option) value. Code:
I would like to create a listbox control in asp.net that has the capability of multiple columns like the Windows.Forms.ListBox control.
I have searched high and low and have only found advice such as concatenating the strings into one or using a ListView which do not seem ideal to me.
Would it be possible(and fairly easy) to create a Custom User Control, fill it with multiple listboxes and then programatically change the selected indexes of all of the ListBoxes when the selectedindex of one is changed?Custom Web Controls is another option but its apparently more complex to implement.
I wanna update a listbox via another listbox and sending new values into database.How can i do it in asp vbscipt?
View Replies View Relatedif it is possible to narrow in on an item within a listbox of states. For example, right now if I type "W", I will immediately drop down to those states beggining with "W".
However if I type "WI", I go to the top of the list with those states beginning with "I". I would like to continue to zero in on the state by dropping down to those that begin with "WI". Is this possible and if so, how do I go about doing it?
I would like to be able to use an autocompleting listbox - that is, one where you can select an item in the list by typing the first few characters; the standard IE listbox only responds to the first character.
I'm happy to pay a few quid for a 3rd-party component/activex control if necessary but I imagine something equally good could be done with client-side code.
I found out that I can't get the value of a disabled field with Request("myField"). An alternative could be 'readonly', but my field, that is a listbox <select>, doesn't have this attribute.
View Replies View RelatedI have a listbox whose MULTIPLE selected values are retrieved using
Request.Form("<listboxname>")
This returned a comma separated array.I am gonna display these values one below the other on the screen. When i retrieve the values from the array using ArrayName(0),ArrayName(1),etc.. the values along with the COMMA are also displayed. When i Remove the Comma with a function like this..
somevariable=Instr(ArrayName(0),",") -1
It errs....
How to remove the comma while displaying?anyother method?
I have 2 tables in my database, AUTHORITY and AREA. I have 2 listboxes on my ASP page. The first one selects all from AUTHORITY. I have one recordset so far, obviously pulling out these values from AUTHORITY.
What I want is to have listbox 2 automatically populate with values from AREA where a field = the value of AUTHORITY. I know this can be done with onChange events in Javascript but I can't work it out.
How do I get rid of the borders in a ListBox? There are atributes for TextBox and Image but I can find no way to do it for ListBox. What is CssClass artibute? If its the Css style it does not work either. Unless it has to be somewhere else rather then on the page, I tried it few times.
View Replies View Relatedi have this form, which contians list boxes. wen a user selects his choice n clicks submit button. it gives an error of type mismatch. wat changes shud i make in my database table's datatype wen recieving data from a listbox? i tried selecting TEXT but it didnt work. cud there b another reason for this error?
View Replies View RelatedYou should know the difference between the javascript and asp error. When the page cannot be displayed then it is ASP error and the line number mentioned will be the one in the actual asp file. When the page can be displayed and the error pop up then it is the javascript error, for this kind of error you have to check the source file for the line number.
I hope now u will be able to differentiate the error and to look for the correct line which is causing the error. Back to the error you have mentioned. Does the main_head.asp have the javascript function called alterTab()? Remove this include file and try whether it cause the same error.