How To Hide Form Field Based On Dropdown Choice
Dropdown has three choices. If the third is chosen, the next field needs to be hidden. is there an ASP version of a show/hide script?
View RepliesDropdown has three choices. If the third is chosen, the next field needs to be hidden. is there an ASP version of a show/hide script?
View RepliesI have a field in my add page, "Method of Payment". It is a dropdown box with the choices:
Cash (value =1)
Check (value =2) etc.
Depending on which choice is made, I need a date to fill in the "Date Paid" field in the same table. Here is the code below. I'm getting a syntax error. Any ideas? Code:
I have an asp page that displays informaton from an Access database. I want to create a form that allows users to display only data that matches their search criteria.
I have made many forms like this in Front Page with the Database results wizard, but I want to manually code it. Code:
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:
I have an index.asp page that displays my database items, along with their respective categories. The categories are an include page (left.asp). How can I hide the category if there aren't any items for that category? Here are the 2 pages below....
View Replies View RelatedI have a input form with 5 fields. One of the fields is MajorNo and the other is named Description.
I have a reference table in my MS Access database (tblMajor)that lists the major numbers and their descriptions.
I would like to have the description field in my ASP automatically filled based on the major number entered on the form, so the user will only need to input the major number when submitting to the Access table (tblSalesTotal).
I am trying to pass a hidden field value on a form into another field on the
form so that it can then be inserted in the database, to enable me then to
reference that number at a later date.
(The hidden value (1 for example) would then automatically get passed to the
other input field.)
The code for the text field that allows users to type an number into it for
submission to the db is below, but what code do i need within the hidden
field to populate this text field below so that users do not have to type the
number in? Code:
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.
I have a page that has a form on it which has a dropdown list on it. It connect to an sql database and populate the list. What I would like to do is make the list editable so that if the data returned doesnt contain what I want, I can type in the data I require which will then be updated to the database when the form is posted. Hope I've made sense, you may be able to tell.
View Replies View RelatedI've been searching for an answer to this for quite some time now and have found nothing, so maybe (hopefully) someone out there will be able to help me.
At my work, we have a lot of folders for different jobs we've done. And right now, we have more than one person making the folders for all the new jobs that we get. I am trying to make a database were it will only show the jobs that have not had folders made. In order to do this, I've created a field titled "Initials". I want the webpage to pull up all the records where the Initials field is empty, but I'm having trouble doing that. I've tried a few different things and have found no success.
I'm not having a problem accesses the database or updating it, just displaying the right information. I'll give a little illustration (because I'm never good with words):
Say I have 3 jobs: Job #1, Job #2, and Job #3. Someone has already made job folders for Job #1, but Job #2 and Job #3 still need to be made. Since Job #1 has been made, that means there are initials in the initials field of the database and thus, I do not want that Job being displayed on the "To Be Made" page. Job #2 and Job #3 do not have initials in the initials field and as such, I want to display those jobs....
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:
How does one return records in a recordset based on a time/date field. If todays date is 8/25/04, how could i return all those records from 8/25/04. Mind you, i have long date format ex. "8/25/2004 4:46:45 pm"
I dont want to user a form for this i simply just want these time- sensative records to be returned in the recordset .
I have a dynamicaly drop down the problem is that it places a blank in the first position I need for it to only display the values returned Code:
View Replies View RelatedI have an access db called boards and a table in it called notes. I have 3 fields in the table ID, subject, and notes. I have code to search the db and display the results in the notes field.. This code works very well. I wanted to modify this code so that I can use a dropdown menu instead of type in the search field but i cannot get the dropdown menu code to display the search results. Code:
View Replies View RelatedASP/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:
my question is regarding using ASP to loop through the results of a sql query and calculate a monthly total based on a date field.
I am using the following query to total the number of train rides for a given branch by day type (weekday, Sat., Sun.) and create a 3 month rolling avg. (to diminish large fluctuations in the data). I am using Oracle 9i to store the data.
Please see below for the database query, the query output, and the desired output using ASP to sum the rides for each month. Code:
I have a page which reads the contents from a certain table. The displayed text is followed by a link which is also stored in that table. They can just click the link belonging to a certain newsitem and the page with that news will display. But, for every new item I make a new page. What I want is that the link every time opens the same newspage but with only the selected newsitem. Something like "SELECT description FROM tblNews Where ID= [the ID belonging to the link I pressed on the previous page]"
View Replies View RelatedI 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 RelatedI'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.
I see that ASP allows you to specify the scripting language of your
choice - including (if you get the COM object) PERL, REXX and more. That
seems pretty good, I think.
Out of the box, it supports VBScript and JScript.
The question is (and I know that personal preference will come into
this) what would you choose to use out of JScript and VBScript? Does one
actually have more capability than the other?
On a webpage I have three comboboxes. The second and the third are dynamically filled dependent from the choice in the first combobox. Each choice in all three boxes consist of a numeric value and a string.
This is done through a javascript and it uses the numeric values of the first box. When submitting the page to an asp script I don't want to post these numeric values but the selected strings. Can this be done?
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.
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.
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.
I would like to list IN our Active directory all group that begin named and start with "GRP-" to put in a dopsown list for a form.
Maybe for the begging, the code to only list group in AD to display in a webpage can be nice.
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.
I have a form where the visitor should enter the e-mail adress, a password and some additional info. When the form is submitted I want to automatically send a confirmation e-mail to the visitor, containing the information from the form (like the procedure when joining this forum :-)). Is it possible to achieve that with ASP? Would be very grateful if anybody can finish the code below... because I don't know how to handle the variables after I have retrieved the form info..
This is enterinfo.htm.....
I have a form where a visitor can enter som information, in this case the e-mail adress, password and some additional info. As soon as the form is submitted I want to send an automatically generated e-mail confirmation to that user's e-mailadress (like the procedure when joining this forum for the first time). When I have retrieved the info from the form in the "confirm.asp" I don't know what to do....
View Replies View RelatedI 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.
I have a category that I will call "company". in my access DB, there are about 6 or so companies. On another table, I have a list of locations that are related to these companies.
What I want to do, is have a drop down menu that lists all the companies. When you select the company, the second drop down menu will automatically populate with the locations of the company you selected in the first dropdown.
Anyone know any links to some examples of this? My google searches have been pretty fruitless since Im having a bit of a problem trying to explain it concisely (as you probably noticed).
How do you make a form field's value be determined based on the page URL?I've seen sites that you can change the URL like this (given "UserName" is the name of the field):
Code:
http://www.yoursite.com/page.asp?UserName=baseballdude_
Then when I clicked to visit this page, when it loaded, the value of the UserName field would be preset to baseballdude_.I've tried doing this for one of my sites, but it doesn't work. Is there some way of enabling this?
Ive got a session("name") and the following form in my website:
<form action="updateName.asp" method="post" name="myform">
<label>Name</label><br />
<input type="text" name="Name" size="25" maxlength="60" style="width: 50%"><br />
<br />
<input type="submit" name="submit" value="Update Password">
</form>
How can I equal the value of the form field name with the value of the session so the name will be displayed on the text field?
I have a form that users fill in, thefirst field is a username, which
must be unique.Currently only when I attempt the Insert into the DB does the restaint
inform the user that it already exists.Is there any way i can check , let say onblur, if that username exists, so that they dont have to complete the whole form before being
informed?