values of insertion to the db based on selected drop-down list

Hello I am currently adding values to the database based on a selection in the menu dropdown.
is all that I need.
This does not work properly. Thanks for any help
My goal is if they choose one of the following
Toyo
Hon
Suba
It will be inserted into the db.

Thank you


<!----------------
Cardaddform.cfm

has a list dropdown and based on the falling down of the selected list, it assumes that to fill the
Car_dbTEST db
Table of Car_tab
car_make field
with values
Honda
or
Toyota
or
Subaru.
This is the page: - >
< html >
< head >
< title > car add brand < /title >
< link rel = "stylesheet" href = "styles.css" >
< / head >

< body >

< h1 > < / h1 >

< table >
< action = "CarAddAction.cfm cfform" method = "POST" > "

< b >
Car < td > < table >
< td >
< SELECT name = "CarMake" size = "1" >
< OPTION Value = "Toyo" > please select < / OPTION >
< OPTION Value = "Hon" < cfif Carmake is 'Honda' > selected < / cfif > > Honda < / OPTION >
< OPTION Value = "Toyo" < cfif Carmake is 'Toyota' > selected < / cfif > > Toyota < / OPTION >
< OPTION Value = "Suba" < cfif Carmake is "Subaru" > selected < / cfif > > Subaru < / OPTION >
< / select >
< table >
< /tr >


< b >
< td > < table >
< td >
< input type is 'submit' value is "Take Add to database" >
< table >
< /tr >

< / cfform >
< /table >

< / body >
< / html >
<!-then sends to the action of the CarAddAction.cfm page

< name cfquery = "InsertCarInfo."
DataSource = "#request. MainDSN #">"
INSERT INTO Car_tab)
car_Make

)
VALUES)

"#Trim (Form.car_make) #
)
< / cfquery > -.


The value you use for the name parameter in your SELECT becomes the name of the FORM variable that is sent to the action page, assuming a POST method. Goes same for tags of entry... the name you use becomes the name of the FORM variable.

Phil

Tags: ColdFusion

Similar Questions

  • Transparency of the IR on bottom of drop-down list filter in IE7

    Hello

    I have a problem with the transparency of the IR on bottom of drop-down list filter in IE7.

    Please try to access http://apex.oracle.com/pls/apex/f?p=36675:2 using IE7.

    If you click on the header of the IR to remove the filter down, we could see the bottom of the filter drop-down is semi-transparent and mix with the data in the table below. IT IS VERY difficult to read.

    The existing market research indicates it is already fixed in the 4.0.1 however I could reproduce still use IE, version 7.0.5730.11

    No help here please?

    Thank you ' case
    Ligon

    This has been answered in

    Re: Menu Transparent - Apex 4 - Bug?

    ======================
    Just add

    the head of the model to replace default css and problem solved

    Published by: Pakuuj on October 5, 2010 01:06
    ======================

  • Create a secondary named calculation in a repeating subform based on a drop down list?

    Hi all

    I need a little crazy script. Not sure it is even possible.

    What I have:

    1. repeating subform SummarySub amounts
      1. calculation at the end of the form TotalOver field gives the total dollar amount of all iterations of SummarySub

        so far, so simple. but then:
    2. I need another, repeating the SubRow subform at the end of the form to give to other total:
      1. based on the drop-down list the name of the originator in SummarySub
      2. and break out the totals of all iterations of SummarySub based on payer such as chosen by the user names.

    Ideally, the subform (the principal totals) (B) at the end of the form would add instances as the user leaves the field name of the payer. I was not able to find a way to make and to keep the value in the field (name of the payer) of the additional instance.

    All this makes sense?

    I'll appreciate any help.  I'm trying to learn more about JavaScript in LC, but my bills just keep coming...

    Thank you very much

    Laura

    Dropbox - AFBS_OverpaymentReport_121914.pdf

    Hi Laura,

    Take a look at the modified version of your form, https://sites.google.com/site/livecycledesignercookbooks/home/AFBS_OverpaymentReport_01011 5.pdf? attredirects = 0 & d = 1.  I added a subform called PayerTotals, which has a summary of insurance created in his event to calculate.  The code looks like.

    var oFields = xfa.resolveNodes("SummarySub[*]"); 
    
    var nNodesLength = _SummarySub.count; 
    
    var nSum = 0; 
    
    var insuranceCompanies = {}
    
    for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { 
    
     var item = oFields.item(nNodeCount);
    
     if (!item.InsuranceCompany.isNull && !item.OverpaymentAmount.isNull) {
    
     if (insuranceCompanies[item.InsuranceCompany.rawValue]) {
    
     insuranceCompanies[item.InsuranceCompany.rawValue] += item.OverpaymentAmount.rawValue
    
     else {
    
     insuranceCompanies[item.InsuranceCompany.rawValue] = item.OverpaymentAmount.rawValue
    
      nSum += item.OverpaymentAmount.rawValue; 
    
    totalover.rawValue = nSum;
    
    _PayerTotal.setInstances(0);
    
    for (var insuranceCompany in insuranceCompanies) { 
    
     var payerTotal = _PayerTotal.addInstance();
    
     payerTotal.InsuranceCompany.rawValue = insuranceCompany;
    
     payerTotal.totalover.rawValue = insuranceCompanies[insuranceCompany]; 
    

    Hope this helps

    Bruce

  • If/Then to control the behavior and the importance of the 3 fields according to drop-down list

    My form has 3 fields that I need to control their values and/or the behavior based on the value of the drop-down list.   If the value is 'original', I need the field value may not be mandatory, and 2 fields melts just return null.  If it is selected to 'change', I need the current value to be mandatory, and calculations made on background 2 fields.    Here is what I have in the event exit (JavaScript) from the drop-down list, which is called OrderType, but nothing happens.  What escapes me, or do I need this on the incorrect event or should I use FormCalc?

    Appreciate any help, thanks!

    2-5-2013 10-26-13 AM.png

     form1.#subform[0].OrderType::exit - (JavaScript, client)
    
    if (this.rawValue == "Original")
    {
        xfa.resolveNode("form1.#subform.value_curr").rawValue = "";
        xfa.resolveNode("form1.#subform.value_curr").mandatory = "disabled";
        xfa.resolveNode("form1.#subform.value_change").rawValue = "";
        xfa.resolveNode("form1.#subform.value_total").rawValue = "";    
    }
    else if (this.rawValue == "change")
    {
        xfa.resolveNode("form1.#subform.value_curr").rawValue = "";
        xfa.resolveNode("form1.#subform.value_curr").mandatory = "error";
        xfa.resolveNode("form1.#subform.value_change").rawValue = xfa.resolveNode("form1.#subform[5].tblBOM.FooterRow.GrandTotal");
        xfa.resolveNode("form1.#subform.value_total").rawValue = value_curr + value_change;
    }
    

    I've sent the updated document to your email ID. Please chk.

    Thank you

    Sofiane

  • Disable the AutoComplete, but keep a drop-down list of suggestions

    I would like the behavior that if I type something in the impressive bar and press ENTER, I find exactly what was typed and nothing more. However, I like to have the drop-down list of suggestions autocompletable to select explicitly be me, via the arrow keys.

    I can as far as I know, disable or enable both.

    Hello BenFoppa, yes you can do it - enter on: config in the address bar of firefox (confirmed the message information where it appears) and search for the preference named browser.urlbar.autoFill. Double-click it and change its value to false.

  • Box selection drop-down list in the multicolumn list box.

    Hi friends,

    Is it possible to insert the drop-down list box in the multicolumn list box.

    You can see this kind of GUI in "multiple variables Editor.

    I have attached screenshot of this screen.

    "picture explains more then thousand words.

    Thank you.

    And here's one: http://forums.ni.com/t5/LabVIEW/Add-a-Drop-down-menu-Combo-Box-into-a-specified-cell-of-a-multi/m-p/...

    You can also take a look at this code in LAVA: http://lavag.org/files/file/31-type-sensitive-popup/

  • How to define the format of a field drop-down list text align at the top of the field instead of the Center?

    I have a form with the fields of data entry simple Acrobat 11. I have, for the first time inserted drop-down lists and most of them is single-line fields. However, there are a few examples where my field must be larger to mask unwanted background. (The field will define the colur to white background are data entry, but I did not write the script for this.) When a selection is made, it appears centered in the field and I need to be aligned to the top.

    I guess I can put a script on the Format tab, in the custom format script, but I don't know enough about Javascript to run on the syntax. I guess it would be a simple line or two of code. Can anyone help?

    You have no control over this. They are always vertically centered. You can use a separate field in the drop down menu, however, and control its background. I suggest to use a read-only button.

  • Change an amount (that docks a calculation) based on a drop-down list

    Hi all.

    As I said in the title, I'm trying to dynamically change a field (called CostSalesforce) dynamically from the selection of the field drop-down list (salesforce_company) and have this indictment in a running total that I have form and quantity changes.

    2015-10-22_1343.png

    Fixed the amounts you want to use as the values of export for each of the items in the drop-down list field, and then use this field in your calculation as you would a text field.

  • How to fill a textfield based on a drop-down list and a checkbox control

    Hi guys,.

    I need help.
    first step: I have a drop down list, if I click in the dropdownlist control 'a' and place it in the digital field a number greater than 99, checkbox must be marked and second step: a textfield1 must be visible.

    the first stage works perfectly, but the second does not.
    This is my code for the second stage of the event: java script of change of

    If ((DropDownList1.rawValue == "a") & & (this.rawValue == 1))
    {
    TextField1.presence = "visible";
    }
    on the other
    TextField1.presence = 'hidden ';


    everyone has no idea why?

    Thank you!!

    Diana

    Hi Diana,

    You are on the right track. deleteItem is zero base; so if you want to remove the second point, it would be deleteItem (1).

    I would recommend a script similar to the output from the drop-down list, so that if the user goes back and changes the value, the same logic would apply. Also when you remove items from a drop-down list by using script, it is useful to addItem() again in the other part of the if statement. In this way, you can restore the list because the shape is changed.

    Also I would wrap the script in the numberField in another State to check for null first.

    Attached example.

    Good luck

    Niall

  • Raising the event "output" from a drop-down list in all instances of a table row

    I have a drop-down list in a row of table with multiple instances that performs a calculation on the exit event. This calculation takes information from 2 other drop-down lists listed above not repetitive rows of the same table.

    The behavior desired is: If the user change their choices above, all instances of the drop-down list below to execute the "Exit" event script to access the new values above.

    My script is:

    RowOptionalCoverage.DdlCoverageType.execEvent ("exit");     It works, sort of

    It updates only the first instance of RowOptionalCoverage and any subsequent instances. The user can 'Tab' through instances and trigger output for each instance event, but this isn't a reasonable solution.

    I tried using the method resolveNodes without success. I understand, using the method resolveNodes may be required when you reference multiple instances of an object:

    this.resolveNodes ("RowOptionalCoverage [*]. DdlCoverageType [*] ") .execEvent ("exit");"     does not work

    xfa.resolveNodes ("RowOptionalCoverage [*]. DdlCoverageType [*] ") .execEvent ("exit");"      does not work

    No doubt, I have to be incorrectly using the resolveNodes or rate something? Probably something simple.

    All the tips are greatly appreciated.

    Stephen

    Hello Stephen,

    You need to loop through each instance of the line and force the exit event. Without the form, it should look like:

    var oRows = xfa.resolveNodes ("RowOptionalCoverage [*]");
    oNodes var = oRows.length;
        
    for (var i = 0; i)< onodes;="">
    {
    xfa.resolveNode ("RowOptionalCoverage [" + i + "]"). DdlCoverageType.execEvent ("exit");
    }

    You could also index table to determine the number of row repeat:

    var oNodes = RowOptionalCoverage.instanceManager.count;

    You may change this to make it work.

    Good luck

    Niall

  • Fill other fields based on a drop-down list box

    Hello

    I am completely new to LiveCycle and just starting to teach me how to use it.

    I want to speed up the filling of a purchase order by bringing them to fill based essentially on what is put in other areas.

    For example, I would like to than our usual suppliers to be included in a drop of water to the bottom of the box (I know not how, at least) and then have the address fields automatically filled.

    I know that I can do this using javascript, but it is rather annoying because I don't want to sit here put 276 suppliers in my script. In addition, I don't want to have to edit the script whenever we want to add a new provider.

    Is it possible to create a form that made it and can pull info on another file or database? Also, I would make it pretty fool-proof when it comes to adding new suppliers.

    Thank you

    Darryl

    The way to proceed is to hang on to the top of the drop-down list for a service web and that the web service returns a list of providers (in load of the form). Once the user selects a supplier a second web service would draw information and fill in the appropriate fields.  This technique is easier to configure on the client machines (as all the information is contained in the form). You will need to get another piece of software called LiveCycle Reader Extensions Server to allow the form make calls from web service of the player (assuming that the reader is used).

    The form can connect to a database directly, but this solution has drawbacks as well. You need to configure a dataconnection on each machine as the machine must be on the same network as the DB. It will work on Windows machines. You also punctuated by player to allow DB with Reader connections.

    Hope that helps

    Paul

  • How to view the separate date in a drop-down list

    I know I've done this before. For the life of me I don't see what I'm doing wrong. I have an outputing to query date/time formats from a database Access in a drop-down list box select. I can't go out on double dates. I wonder if it is because the time in the database is different for each line? I want to just display an 08/09/2006, even if there are 40 of them. Here is my code:

    < cfquery name = "qdate" datasource = "mydb" >
    Entereddate SELECT DISTINCT from archivedletters ORDER BY entereddate
    < / cfquery >


    <! - exit - >


    < do action = "queryarchived.cfm" name = "StartDate" method = "post" > "
    < strong > sample numbers by date range search: facilities > < br >
    Beginner: < br >
    < select name = "StartDate" >
    < cfoutput query = "qdate" >
    < option value = "#entereddate #" > #DateFormat(entereddate, 'mm/dd/yy') # < / option >
    < / cfoutput >
    < / select >

    < br >
    End: < br >
    < select name = "EndDate" >
    < cfoutput query = "qdate" >
    < option value = "#entereddate #" > #DateFormat(entereddate, 'mm/dd/yy') # < / option >
    < / cfoutput >
    < / select >

    < input type = "submit" value = "Go" >
    < / make >

    Thanks for all the help. I tried the method classified by MikerRoo and that seems to fix the problem.

  • Hide the fields to add fields drop-down list in the advanced search mode.

    On the drop-down list to add fields in the field of the advanced search displayed by an af:query, is there a way to hide some of the attributes? He seems to show all the attributes of the default VO.

    The fields must be visible on other pages that use the VO. Table Panel and search queries will only to display a subset of the fields in the VO.

    Assigning to the attribute Display tip to hide will not do; at least this seems to be the case, because if I do that, then, the field is not available on the data control to be placed on other pages.

    I guess I could create a separate VO just to the search page; but I try to avoid this, it invites excessive maintenance as the system grows. If no indication on how to hide a field VO on add fields while leaving the field to be displayed on other pages would be appreciated.

    Versions: JDeveloper 11.1.1.4, ADF business 11.1.1.59.23 components.

    Thank you.

    I wrote a blog post on this subject and a sample of http://tompeez.wordpress.com/2012/01/06/jdev-afquery-hide-some-attributes-from-query-panel-but-show-them-in-the-result-table/ here

    Timo

  • Please help a poor beginner to open a text box based on a drop-down list

    Hello world

    I am quite new to the life cycle and my experience isn't in the lineup, so I hope that you will be kind to me. I designed a form that we use to send to our Bank to hire contractors. I need to make a text field become visible collection of some inscriptions on the drop-down list. for example, if an entry in the drop-down list "Holiday", I need another text field become visible to the user of maunally enter an extension number. If the user selects, say, "Study leave", I need the text box to stay invisible to the user.

    I hope this makes sense.

    Thank you guys & Gal

    Heavy E

    It is a java script placed on the drop-down list on the change event;

    If (xfa.event.newText is "Vacancy")
    TextField1.presence = "visible";

    else TextField1.presence = "hidden";

    Field1 text is defined as hidden

    To answer your second example, add in the same field:

    If (xfa.event.newText is ' Study/leave')
    TextField1.presence = "hidden";

    If it's confusing, let know us

  • More simple way to complete the xml data in a drop-down list

    Hi all

    I have a dept.xml as below.

    <? XML version = "1.0" encoding = "UTF-8"? >
    < departments >
    Department < and > account < / Department >
    < departmentAdmin < / Department >
    Department < and > Security < / Department >
    < / departments >

    Can I know what is the easiest way to fill in the 'account', 'Admin' and 'Security' in a drop down list?  And how?  Can we by befriending pure?  Or has done by the script?

    Thank you all!

    CL

    To embed the XML data in the PDF file, open it in Acrobat and then:

    Forms-> manage form data-> import data.

    And you choose XML file.

    I hope this helps.

    Diego

Maybe you are looking for

  • Cannot enable Task Scheduler

    I have a HP Pavilion MS227 with Windows 7 Home Premium. Try to activate the Task Scheduler, so I can defragment. When I right click on the Task Scheduler in system, starting services appears not highlighted so I can enable it. I ran antivirus and sof

  • OfficeJet pro 6830: usb 3?

    are there usb 3 cables for printers, and if so, it increases the speed? I was previously a Wireless connection, but I find usb 2 is faster than wait for the wireless connection. What is ethernet? Is it faster?

  • broken graphics

    I have a HP6545b with W7 (32 bit) - after that some subjects with a screen black start upward and then a screen scrambled when he does not shine I took to a technician who said that the graphics card is over and cannot be replaced. RAM & hard disk ar

  • Graphic driver Intel HD in Windows Server 2012

    Hey guys, I downloaded Windows Server 2012 through Dreamspark yesterday and installed on my desktop. But the system cannot identify the Intel HD graphics 2000.When I try to install the official driver for Windows 8 to Intel. An error window came out

  • Error 0x80072F76 Windows Update code.

    Help please, I can't do the manual Windows updates - don't know if those auto works or not - on error code prevents downloads. I did Google and apparently it is a good registry error but can't find a direct answer or error on the Fix code he Windows