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
ADVERTISEMENT
I need to have my ASP form "post" action=? pass to a different confirmation page based on a radio button selection on the form, after submit.
Depending on which radio button they click on, they will receive the same confirmation but then be redirected to a selection specific page, based on the radio button selection. I'm assuming I need to create several different action pages, each with a different redirect, then have the radio button determine which action page the form is directed to based on the radio button selection.
I've tried several different options, such as creating a variable on the form, sDirectionVar, with redirect conditions, but I don't know how to call that on submit? I'm not sure I'm even going in the right direction.
View Replies
View Related
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
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
I have a form on one page where someone selects a bunch of options and details about a specific category. Then on the next page they fill out a form with contact information, name, address, email, etc.
Well what I want to know is when they click Submit on that contact form is there a way to have it so it goes through and searches the database for any that match the state and county(which they will select from a )??
So what I basically want right now is for the first form to be filled out, then the second form to be filled out, then when they are submitted it will go through the database and select everyone in there with that state and county, then on the next page display the results of both forms AND the matches in the db(obviously whatever fields I want it to display).
I already have both forms(basic html), I already have the dynamic dropdown for state and county(classic asp), what Im wondering is how do I put that dynamic dropdown in the contact form and then when submitted it will go through and search the db based on what was selected there. Would this be some sort of onClick for the submit button tellin it to search the db based on the dropdown or how would I get started on something like this?
There will be other information on the dropdown like name address email so one problem I was wondering about was my dropdown menu. When you select the state it refreshes the page and then loads the counties, so wouldnt that erase anything that was filled out on the form?
I could make it so they actually type the name of their state and county but that causes problems too because if they mispell either then it wont return any results.
View Replies
View Related
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
I am working on a small application for senior users, so I want to limit the option for incorrect input whatsoever. I have a drop down box that is populated from a query and I want to make it so that when an option is selected, the pertinent text fields are populated based on the selection.
All the info I need is already being extracted from the query so its just a matter of displaying the right info based on the selection. I have been looking for examples of code but they all seem to use javascript. I am not too strong in javascript so I kinda avoided those. if there is a pure asp example, that would be fine!
View Replies
View Related
We have a web site IIS 5 (on Win2000k) with Oracle 9i backend (Sun unix).
There is 1 user ID to oracle(APT_W3) that is used by all users (50).
We have a global.asa file that has one APP Start connection string using OLE
DB:
Application("dbConnString")="Provider=MSDAORA.1;Password='SDERSD';User
ID=APT_W3;Data Source=CCEWSDD1_new;Locale Identifier=1033;OLE DB services=-1"
The first page that a user sees asks that they select the area they want to
see (western, northern, etc) from a dropdown menu. Once they select it and
hit save they can go to other pages, session varibles indicating what area
they selected are then passed to pages. Currently all areas are in one
database.
What we want to do is have areas in separate dbs, a northern one, a western
one.etc. Each will have separate user ids (APT_W2N, APT_W3W,etc).
We want the users to have the web page presented to them where they select an
area. Based on the area they select, the appropriate conneciton string will
be used (the one in the global asa). Code:
View Replies
View Related
I have a selection list of the 50 states that is not dynamically built. If &state=CA is in the query string i want the selection list to automatically select CA out of the selection list since that is what was in the querystring. Know what I mean?
View Replies
View Related
I have a dropdown list where u can add students name inside the listbox. As u can see there is a "Please select one" option in the dropdown list also. When i click on the option, it will be added into the listbox also. Can someone pls help me to solve this in JavaScript. My attachment.
if (document.teamForm.newMember.value == "-- Please Select One --")
{
alert ("You can not select this option.")
teamForm.newMember.focus();
return false;
}
View Replies
View Related
I have a list box that allows users to search an SQL database on ZIP, Name and so on
After the submit the List Box selection always goes back to the defaut selection.
I figured by writing the current selected item to a cookie prior to the submit I could recall it upon reload.
Does anybody know how to set default selected item for a list box? Am I going about this the right way? The more I research it seems dynamically creating the list box is the way t go
View Replies
View Related
Here is my situation, I have an ASP page with 2 list boxes. The first list box displays people that are available to be selected. The other list box shows the people who have been selected. This makes it easy to see who has been selected and who has not been selected since if you are in one list box you will not be in the other.
I know how to write the SQL to get the data for each list box but my problem is getting this to work without having to reload the whole page (I thought I could just re-run each list boxes' SQL and display the results instead of having to load the page again).
Write now I was thinking each list box would have an OnClick or OnChange JavaScript event. I would then have 1 table with all People in it and a second table of people who were selected. When the user clicked on the list box of available people (not selected) I need to run an ASP insert script and then requery both list boxes to pick up the change. In the case a user was removed from the selected list box, I need to run a Delete ASP script.
My problem is that I can do this if I reload the page every time a person is selected from a list but there has to be a way this can be done without reloading the page. Do you have any ideas or suggestions?
View Replies
View Related
I working on an ASP page that has a drop down list that gets its contents from a SQL table.
Can anyone show me how to use the selected item from the drop down list and use it as a parameter in calling SQL stored procedure (this procedure simply updates a table so there are no result sets).
I have designed my page to include a submit button and was wondering if it is possible to call the procedure as soon as the submit button is clicked. I get really confused with whether to use a server side or client side script.
View Replies
View Related
how do i get a value from a combo box and populate a list box base on the selected value from a combo box? If possible can i get a sample coding.
View Replies
View Related
I have a survey/member form that gathers information. I would like to have a drop down list on a page that a user selects, either 1, 2 or 3.If 2 or 3 I would like to show on the form another field for information gathering ie:if a user has 1 cat, fields for cat name, sex & age show.
if a user has 2 cats, 2 fields show instead of one for each, and the same
for 3.....
View Replies
View Related
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
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
I have a series a forms that submit data to different tables in a database. As it stands, when a user completes FORM 1 and clicks the SUBMIT button, the FORM 1 data is submitted (action = form2.asp, method = post) to ASP code at the top of FORM 2 (request.form("form1 field name") etc...), and submitted to the database with SQL code, also at the top of FORM 2(INSERT into...). Hence the submit button on FORM 1 directs the user to FORM 2, and submits the data which is exaclty what I wanted. However, I now need the users to submit multiple sets of data with FORM 1, and direct them to FORM 2 once they have finished using FORM 1. Most importantly, I need to pass a few parameters from FORM 1 to FORM 2, and have these parameters submitted to the database.
My main problem is getting a fresh form1 after submiting the same form1, in preparation for anoter set of data using the same form. Basically, the database has 'one to many' relationship tables. Form1 and form2 are both populating the 'many' tables, so that each form needs to be filled-in several times while retaining the key field of the 'one' table. At the moment submiting form1 takes me to form2. Is is possible to submit the data to the database, get form1 back again to submit more data, as many times as required, then click another button to load form2 when the user is finished with form1?
Can anyone please give me some pointers? or at least explain the concept of what I need to do. I am a novice and it's taking me a while to get to this stage. Any help will be greatly appreciated.
Is it possible to post FORM1 to itself and insert the data (i.e. place the request.form at the top of FORM 1) If so, how do I direct users to FORM 2 while retaining my parameters?
View Replies
View Related
I have a db with about 15 fields in, what i have a list of all the fields on a form, simply check the checkbox relating to that field and on the next page it creates a table only with those fields in it.
View Replies
View Related
I've been racking my brains over this one. I have a Classic ASP edit
form with many fields, one of them a Status drop-down. If the Status
(option value) has been changed to "Pending" for instance, I do a
objMail.send, otherwise it doesn't send.
No problem, but how can I
prevent the mail from sending AGAIN if a user goes back to the page and
updates another field, or even just refreshes the page? If it helps, I
am updating a SQL Server database.
View Replies
View Related
I have a form that has approximately 7 text fields and 1 checkbox.
Generally when this form is submitted(to itself BTW) it works fine,
however, when the checkbox is only field that has been
modified/clicked the form doesn't always submit. When it does work, a
Stored procedure is passed form variables and updates to the db are
made. When it doesn't, its as if the form wasn't submitted, it
reloads and resets the page, but the stored procedure isn't triggered.
View Replies
View Related
Is it possible (and if so, how?) to have an asp form page that based upon a user's selection on a field, would generate a input field b that the user selects?
For example:
User selects "name" in a select statement which would list the possible names to select from or if the user selects "telephone" in the same select statement then it would list the possible telephone numbers to select from.
Or simpler:
If user selects A then show P to select from or
if user selects B then show Z to select from.
View Replies
View Related
I know I have done this but my mind is fried. I have a dynamic dropdown in
a form. I need to pull both the dynamic dropdown's ID and name listed in
the dropdown. Need a little help with grey matter tonight.
View Replies
View Related
I have a page with image, image has some image map, I want to submit
form when user mouseover that image map, my code is like this:
<img src="Images/floor4.jpg"usemap="#planetmap" id="IMG1">
<map id="planetmap" name="planetmap">
<area id=f4 shape="circle" coords="65, 93, 11" alt="CF4588"
onmouseover=overf4()>
And I write sub overf4() in vb script
sub overf4()
document.frmSelect.submit()
end sub
when mouse over that point form submit several times until mouse in on
the point I want to sumbit iust one time
View Replies
View Related
I am looking at putting a form on one of my pages that inserts data into my database (MySQL)it is possible to submit this form and then when the form is submitted fire an e-mail off to a member of staff to say that a new record has been added
Has anyone had any experience of doing, or trying to do, anything like this (or even know if it's possible)?
View Replies
View Related
This is from a "back-end" page on my site, but have run into a problem I've not had before, first off the form is being generated with some dynamic capabilities. Simply meaning I'm building it based upon so many records from a database.
Now I've isolated the problem down to 1 particluar text field and somehow related to it's name. When the name is present the form refusses to submit, except when I simply delete a reference to the name it works fine. Below you'll see an example of the code:
View Replies
View Related
I am successfully generating an HTML-formatted email using ASP and a NewMail object. It works great. The content of the email includes a simple HTML form that posts to an asp page.THE PROBLEM:
The form in the email functions properly (can be submitted, opens a
browser and redirects to the "post-to" asp page) but the form data is
not making it. i.e.at the far end in the "post-to" asp page....
request.form("someField") is empty.I imagine it has to do with encryption but can't find any info on the subject.
View Replies
View Related
I know this may be too easy for most of you. I am new to ASP code and I am trying to create a form where you can submit via ASP.
I already created a page with asp but couldn't figure how to send the form to email address. It seems that it requires another page of code what ot do but I can't find anything on the site to show me how it works.
View Replies
View Related
Once the form is submitted from an ASP page, how can I direct the output to display at a new asp page? The output is a text variable.
View Replies
View Related
i have got a very elaborate login page which has 1 form and more than 1 submit buttons.1 for login(preceeded by user name and password fields) and another for forgot password (preeceded by user name field).how can i submit the login details(i.e. user name and password) just by pressing enter in either of the 2 fields?
View Replies
View Related
what was the best way to have a use submit a form. I have a form of mine here. I bassicly just want to get a hold of the information when they submit it.
Whether it will be e-mailed to me or written to a file on my server thats OK. But I want it to link to the ASP file which proccessed it. Could somebody atleast give me an example of how to do this?
View Replies
View Related
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form should be submitted as if the button is pressed. Is this correct?
Does this behaviour vary across browsers?
View Replies
View Related
Some help in creating a form the gets some of it information from an Access database. I am building a website for a company that wants to run conference that you can sign up for on the internet. What they want is a form that can be e-mail to one of its employees and then processed at the office, well here is where I get stuck.
There is going to be among other form fields one for the Name, Company, Company Address…(so one) and a field for the name of the conference, data, time and location of the conference. What we want to have happen is a drop down form menu that you can select the conference from and via that selection the data, time and location field will be filled out for you. Can any one help me with this?
View Replies
View Related