Adding A New Entry To A List Menu Based On A Database

Let's say I have a dynamic list/menu, which gets its values from a
database table, for example a list of contact people where the value is
an ID number and the label is the name. However, if the value the user
wants is not in the list I would like to place a hyperlink which
will...

(1) open a small window, with an ASP form to allow the user to add a
new entry

(2) save the entry to the database

(3) add that value to the list/menu in the parent window and make it
the selected option

(4) close the small window and return to the original window.

I can handle the code for 1,2 and 4, but 3 is what I'm not sure about.
I don't like the idea of forcing the user to leave the current screen,
go to some other form, add the entry they need to the lookup table,
then come back; this seems like a logical approach, but just wondering
how to make it work.

This seems like a common enough situation; anyone have any code samples
or suggestions about how to do this?

View Replies


ADVERTISEMENT

Changing The Value Of A Textbox Based Upon The Selection Of A Menu/list Box

I have a menu box with dynamic values from a recordset (value = 'Size' column)

I then have a textbox for which I want to display the 'Price' column according to the record selected in the menu box.

View Replies View Related

Populate List/menu From A Database

what is code for populating a list menu with data from a database. also the default(first) option in the list should be "ALL".

View Replies View Related

Autofill Field Based On Entry In Another

have form on asp page with an email address field, when the user enters
their email address I want it to populate another field automatically on the
same page, some kind of OnBlur event. Have worked extensively with dropdown
OnChange events but cant get my head around this one.

View Replies View Related

Classic ASP Sytem Needs To Support Chinese Data Entry - To Do List

I have a large classic ASP web application which needs to now support chinese
character entry (I don't have to worry about the UI yet - the data entry
people can read english). Other than changing the database fields over to
"N" data types, do I need to do anything to the actual entry fields (input,
textbox) on the various forms to be able to capture the information. Some
users will be entering the information in english, while others will be
translating the same info into chinese as they enter it.

I know this is probably much easier in .net, but we have yet made that
transition. Now that 2.0 is available, it should be much more viable.

View Replies View Related

Adding CSS Style To An ASP 2.0 Menu

how to add a css style to a menu in asp 2.0?

View Replies View Related

Change Text Field Based On Menu Selection

ASP/javascript with a drop down populated by an access database. The drop down works fine but I cant figure out how to get it to change a value of a text field.

I want the value in the text field to change to reflect the data in another column in the table, same row. Code:

View Replies View Related

Populate Multiple DropDownMenu's Based On Previous Menu

I have a series of tables, within one database, which each hold unique information, all of which relates to one main table.

I would like to have 4 DropDownMenu's populate themselves based upon the choice of the previous menu.

Example.

Menu A contains four names - John, Henry, Larry, Ed.

When user selects Henry from Menu A, Menu B will show the following choices - Bread, Peanuts, Pickles, Chips.

When user selects Chips from Menu B, Menu C will show the following - BBQ, Ranch, Plain.

When user selects Plain from Menu C, Menu D will show the following - 1 oz., 5 oz., 8 oz.

All of those fields relate to individual tables that all contain a relationship to the main table. Is there a particular way in which I can populate multiple tables based upon the preceeding menu?

View Replies View Related

Sorting Data Based On Dynamically Created Drop Down Menu

i have a page which displays a list of events searched for by a particular date. we usually have a lot of events and i don't want the user to have scroll through all of them, especially if they're interested in a particular type of event.

i have created a dynamic drop down menu which consists of all the event types. how can i got about displaying the events returned by the query to a specific event for that date.

so for example, if some one searches for 03/08/2005, they will initially get a list of all events for that day. if they click on "Closed" from the drop down menu, it will display all the "Closed" events for 03/08/2005.

View Replies View Related

Adding Values To A Dynamic Jump Menu

I've writen the code below which displays a drop down select menu and can be displayed by writing the variable 'sjobs'. The code works fine as it is and the menu is populated with the requested info from the database ok. The problem I'm having is adding url links to the menu values. Code:

View Replies View Related

List Menu

I need to create a page which updates a products information within a record.

the tables are,
products (ID,CatID,sID)
supplier (sID,sName),
category (CatID, CatName)

The above tables supplier and category have relationships to products by using the sID and CatID

I need to update the product details by having a select/option for a supplier and category but if not changed by the user the value already within products table stays the same, therefore the list must be dynamic so that the first item in the list is the one relating to the value in the products table. Also the value must be the ID numbers but must display the names not the ID's to the users within the select/option.

View Replies View Related

Menu List

I have a form page in ASP where the first menu/list function as a filter of
the second menu list. Once I select an item form the first combo I get the
second menu full of options. This is correct. My probem is that the first
combo gets the default value again and I do not see what I did choose.

View Replies View Related

Menu/List Validation

how to validate a menu/list? I can use dreamweaver to validate a text field but not a menu/list.

View Replies View Related

List Menu With Name Of Files

How can I make and populate list menu with name of files from one folder and then select one of their?

View Replies View Related

Read In List Menu Value Into Asp

does anyone know how to read in a list menu value into asp? I need to get the value and then display results with it.

View Replies View Related

Dynamic List Menu

I could not solve for the past 3 days. I am try to build a website using ASP and VBscript. I am still a newbie to it.Let's get to the problem. What I am trying to do is to have multiple dropdown list. Each list menu ( except the 1st) dependes on the choice made in the one above.

I am using dreamweaver, it did generate a the form and everything and I was able to filter the results. The problem is that I don't know HOW TO REFRESH THE LIST. In other words, I can't figure out how to change the list menu options when the choices above change. I have tried to find some tutorial about it, but all I found was with JavaScript and I don't wanna mix VBS with JS.

View Replies View Related

Dynamic List Menu

Does anyone know how to make it so that when someone clicks on certain menu item on one list it automatically updates a second list with values.For example,if i click the Make of a car in one list, i want the second list to automatically update with the relative Models.

I've seen it done on various sites such as www.autotrader.co.uk but can't think how its done. So far i'm populating the first list dynamically with a database but don't know what the next step is to get the second one to do it.

View Replies View Related

Dynamic Menu/List

I currently have an "Add customer" page on my site. On this page you can choose multiple "brands" from a list box. (These brands are dynamic and come from a seperate table in my db). These brands are split up into an array and each added as a row to a database table.

Now I am working on a "Modify customer" page. It has all the same fields as my Add page except that the fields are already filled in with information from the db. I can't seem to figure out how to have my list box have multiple items selected when you first come to the page.

View Replies View Related

How To Remove Blanks From A List Menu??

One of my tables is used for two purposes so there are blanks in the column I'm filtering. I tried using an IF statement but it still put the blanks in the list menu. Any idea how to remove the blank items? Code:

View Replies View Related

HOW To Submit A Form Based On On List Box Selection

I writing an asp application that uses three listboxes. the first one lists departments ids the second list box populates either users or supervisors based on which button is pressed ( users button and supervisors button).

If a user is selected from the list the submit button redirects to page1.asp. if a supervisor is selected the same submit button redirects to page2.asp My question is how can I submit the form without using more than one submit button.

View Replies View Related

Update Field Based On List Selection

What I would like to happen on this page is that when a user selects a company name from a drop down list, his selection autopopulates the cID field based on the selection. The drop down list is getting its choices from the customer table.

As I am still a novice, I am sure there is a way to do it I have not been able to get it right. Code:

View Replies View Related

How To Pass Dynamic List/menu In Forms?

I have a form called form1.asp which has 10 dynamic list menus. This is the code for one of them. In this form I have a recordset. Code:

View Replies View Related

List Box Should Display Underneath Menu Window

I am trying to create a menu for asp.net page. The menu-detail list display, when mouse hovers over the main menu list, like you see in regular windows apps.

When the detail-menu-list window displays, it goes 'behind' combo box (sent to back). For other controls, like textbox, it is fine. Can some explain, how can I send the list box (<asp:listbox>) to become the underneath and not display on top?

View Replies View Related

Annoying Problem With List/menu 'selected'

I am doing server side asp form validation, the form posts to itself and if all the values are accepted the values are inserted into an access db...

I have several list/menu with static value options.

The problem is when I submit the form and another value is incorrect, each list/menu is reset to the initially selected value as defined in dreamweaver (in my case 'Please Select').

With text inputs I can easily set the value to the value passed through the form, however it's not as simple for a list/menu.

Is it possible to change the 'selected' option based on the variable passed?

It's annoying in the sense that even though the user has selected an option, if they make a mistake elsewhere they always have to reselect their list/menu choice...

View Replies View Related

Adding A Drop Down List

I have an asp page that creates a table from a Ingres II database. The headers at the top of the columns are hyperlinks that ad a order by to my list. This was all working fine until I added more choices with a drop down list view_type .

Now I am getting this error:
ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. I am thinking it has to do with when my list is reordered it does not know which view type and is not going through the count. Code:

View Replies View Related

Adding From SELECT List

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

Adding Recordset In List Box

I have 2 list boxes added in the asp page.

First list box contains :Industry (Items added from Industry Table)

Second List box should contain items from Area table.

Industry Table:={id, Industryname}
Area table-{id, industryid(from industry table), areaname}

I want to add Items of the same industry id selected in first combo box
The items should be changed as the inustry selected in first list box changes.

View Replies View Related

Combine List Menu Fields For Email Output

I am using asp to submit a form I've created in asp. I was wondering if there was a way to output the vlaues of three listbox menus.

1. User selects hour
2. user selects minute
3. user selects am/pm

This is now outputting into my strBody as seperate entries. I'd like to combine them into one entry within the strBody.

Please reference strStartTime, I've tried to incorporate this into the email strBody, but am unable to accomplish this. Any help would be appreciated. Thanks Everyone!!!

Here is the asp code for the form: ......

View Replies View Related

Access Database Entry

Does anyone know how I can use asp to access a specific entry in a microsoft access database table without having to run a search of the entire database? I figure this can be done with the primary key, but I'm not sure how to do it. I've looked for tutorials, but none seem to deal with this.

View Replies View Related

Deleting Database Entry

I am having considerable difficulty figuring out how to delete more than one entry in my online database at a time. I thought I had it
Sub Delete()
SET Conn = SERVER.CREATEOBJECT("ADODB.Connection")
Conn.OPEN "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/db/database.mdb")
sqlWhere = ""
aSelected = request.form("Select")
sqlWhere = "ProspectId IN ('" & aSelected & "')"
sql = "Delete * from tblProspect where " & sqlWhere
Conn.Execute sql
Conn.Close
Set Conn = Nothing
RESPONSE.REDIRECT("prospects.asp")
End Sub

View Replies View Related

Blank Database Entry

How do I change a blank database entry, so when I retrieve it blank I output a string say <i>N/A</i> into a table? Currently I have an if/elseif/else like this.Code:

if tf.name = "ID" then
Response.write(bla bla)
else if tf.value = null then
Response.write(bla bla)
else
Response.write(bla bla)
end if

*Note, where the word null is, I have also used the string "" and it still does not work.

View Replies View Related

Successful Database Entry

I have a string of ASP code that writes a new database entry into my SQL server table. Is there a function that I can run directly after the database entry code, that can tell me if the data was successfully entered? Eg of current code:

SQLCode = "INSERT INTO GarProductList VALUES (" & "'" & App_Name & "'" & ", " & "'" & Option_Number & "'" & ")"
response.write "SQL Code is: " & SQLCode & "<br>"
Set objRS = MyConn.Execute (SQLCode)
<< perhaps call certain function here to verify SQL table was updated? >>

If database update successful -> function should return 1 If database update fails -> function should return 0 ... or something like that. In any case, some exception response should be returned.

View Replies View Related

Refresh Values In Select List Based OnChange Of A Dropdown Box

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







Copyrights 2005-15 www.BigResource.com, All rights reserved