Dynamically updating a value based on drop down menus

Hi,
I am trying to make a website for a new computer company.
Part of the website allows you to choose different componets, like
the Dell website. It has different drop downs like CPU, Case,
motherboard etc which list the option we have chosen then it gets
all of the records from each database. So for CPU it checks to see
what motherboard is selected and displays all of the CPUs that are
compatible with that bpard from the CPU data base.
It has the price at the bottom of the page which is
calculated by adding all the prices of the drop down menus together
but if I change an option it doesn't change the price.
How can I have the price dynamically change based on
different values being selected from the drop down boxes?
Thanks for any help
Lewis

You'd do some kind of onChange with the select. Get the value
of the current index in the select and pass that over to whatever
needs it.
Using a JavaScript framework may be best and easiest - like
jQuery. It allows you to do stuff like this quite easily. Though
I'm no expert either - just getting into it.
Are these chained selects then? I also think there's a CF
only version / custom tag out there for this - but it would require
a page refresh everytime the list is changed.
You could also use AJAX I guess.
Cheers,
Mikey.

Similar Messages

  • Why are drop down menus on webpages in Safari no longer working? I have iphone4 ios6.0.1. Is there a fix?

    Since I updated to 6.0, the drop down menus on the web pages I use in Safari on my iphone 4 are no longer working.  The drop down appears and then quickly disappears so that you can't select anything.  Is there a fix?  One example is http://www.scvavolleyball.org/  I need to select Juniors>Girls>Weekend Sites but I can't on my phone....but I used to be able to....and I still can on my ipod touch.  Help.

    The current release supports the white-space property for a text area and it is possible that the website uses white-space: pre instead of white-space: pre-wrap.
    The former will prevent Firefox from wrapping the text.
    You can check that in the Inspector via the right-click context menu.
    *https://developer.mozilla.org/Tools/Page_Inspector
    See:
    *https://developer.mozilla.org/en-US/Firefox/Releases/36#CSS
    <blockquote>The white-space property is now working on <textarea> HTML elements (bug 82711).</blockquote>
    See also:
    *[[/questions/1050456]] Word wrap problems in 36.0

  • Editing Drop Down Menus in Contribute

    I have a client who is using contribute and wants to edit
    drop down menus. These drop down menus link to individual pdfs and
    she changes the names of the pdfs on a regular basis and wants to
    update these links in the drop down menus. The site was created in
    Dreamweaver. In role preferences of Contribute I turned on the
    allow unrestricted editiing which allows form elements to be
    edited. However I cannot figure out how to change the drop down
    menus. Is there any way to edit the drop down menus fields in
    Contribute?

    Create a SSI (with PHP f.i.), best in de root of the site,
    considering the way Contribute is handling linking.
    Call the file something like menu.inc.php.
    Provide your client with the url to menu.inc.php in the
    Bookmarks or explain the Choose-button in Contribute to open the
    file menu.inc.php.
    Keep the file simple (ul/li or p) .

  • How to get value in Second Drop Down based on selection made in first dropd

    Hi All,
    I have a table with first two columns as dropdown.
    The values in first drop down are fixed. However the value in second dropdown should be populated based on selection made in first .
    e.g
    First Column had different departments say IT, SALES, HR.
    Based on department selected I have to populate employee of that department.
    For first dropdown I have taken Drop down by index.
    What should I select for second drop down and achieve desired functionality? Please guide.
    Regards,
    Madhvika

    Hi
    Use drop down by key for fixed values IT, SALES, HR. create on_select action for that drop down.
    in on_select method code like this..
      DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
      DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
      DATA ls_segment1 TYPE wd_this->Element_segment1.
      data lt_segment1 type wd_this->elements_segment1.
      DATA lv_segment TYPE wd_this->Element_segment1-segment.
      data lr_column type ref to cl_wd_table_column.
    navigate from <CONTEXT> to <SEGMENT1> via lead selection
      lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
    get element via lead selection
      lo_el_segment1 = lo_nd_segment1->get_element( ).
      lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
    get all declared attributes
      lo_el_segment1->get_static_attributes(
        IMPORTING
          static_attributes = ls_segment1 ).
    now ls_segment1 contains your first drop down selection value.
      DATA : lv_dropdown type string .
      lv_dropdown =  ls_segment1-segment.
      if lv_dropdown = 'IT'.
    // here fill your second drop down based on IT value.
    endif.
    Hope it solves.
    Cheers,
    Kris.

  • Performing Calculation based on drop down selection

    I need help with simple calculation. Im building an estimate form, and have the fields:
    "Total"  (manually entered total amount)
    "GrandTotal" (automatically calculates Total*1.07 to add 7% NJ sales tax)
    Next I have 3 drop down boxes with payment options, and then text fields to receive $$ amounts based on drop-down selection:
    "1st Payment Option" (options: 50% down, 100% paid in full, custom entry)
    "2nd Payment Option" (options: 50% at completion, 25% in 14 days, custom entry)
    "3rd payment Option" (options: 25% completion, custom entry)
    For whichever options are selected in the drop-downs, i'd like the text fields to auto-fill.
    (Text fields are titled "1st Payment", "2nd Payment", "Final Payment".
    So how do I take the value from "GrandTotal" and get it to automatically be calculated by 50%, 25% or whatever and be filled into separate text fields?

    It can be done with proper form design. You can use the any of the 3 calculation options but some may require some extra form fields and you can specify a numeric value to a drop down option that is different from the displayed text.

  • Get/Set values from a drop down list

    I am trying to modify the http://www.netbeans.org/kb/60/web/web-jpa-part2.html so that instead of entering the data from a text field (in update & add) the values come from a drop down list from a table. I have drop down lists that are populated bothe from the DB and hard coding. When I run, I am able to see the options on the DDs. But none of the CRUD work. I think this is because my set and get for the drop down is wrong. Then again, I also have a few text fields from the original example which also don't seem to work. Here is a piece of my addButton():
            RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
            PaymentDetails[] pv = getSessionBean1().getPaymentVoucher();
            int rowId = Integer.parseInt(selectedRowKeys[0].getRowId());
            PaymentDetails upPV = pv[rowId];
            bankCodeDD.getSelected();
            statusDD.getSelected(); // hard coded value
          upPV.setPrepBy((String) prepByField.getText());
          PaymentDetailsController pvController = new PaymentDetailsController();
            pvController.addPaymentDetails(upPV);
            addRequest = false;
            return null;How do I set and get the values from the drop down so than it passed to my bean? When I choose a row to be updated, make changes and click Update, I get this message on my Tomcat:
    com.sun.webui.jsf.component.DropDown::The current value of component form1:deptCodeDD does not match any of the selections.
    Did you forget to reset the value after changing the options?Can someone please point me to a place which shows how I can add a default value from my DD? I tried to follow http://www.netbeans.org/kb/55/dropdowncomp.html, but unable to complete because I get an error for Options api. The auto-fix imported import org.apache.jasper.Options; But the package given in the tutorial is com.sun.webui.jsf.model.Option. My Java version is 1.6.0_07.
    private Options listOptions[];
    ...//getter setter goes here
    listOptions = new Option[noofDBRows + 1];Many Thanks!

    I don't guess what I may add.
    The contents of the table named lookup appear on the screenshot.
    cell A1 contains the string One-Piece, cell B1 contains the 'associated' value 160.
    cell A2 contains the string Two-Piece, cell B2 contains the 'associated' value 130.
    cell A3 contains the string Three-Quarter, cell B3 contains the 'associated' value 150.
    Now table Main
    In column B the cells contain a pop_up menu with four items like the ones described by Jerrold.
    In column C of the cells contain the formula :
    =IFERROR(VLOOKUP(B,Tableau 2 :: A:B,2,FALSE),"")
    I enhanced it since yesterdays because I forgot to treat the case when cell is blank in column B.
    I apologize but as I'm using my machine in French, the screenshot display the French formulas.
    I repeat that you may find useful infos in the PDFs files which we may download from the menus:
    Help > Numbers User Guide
    Help > iWork Formulas and Functions User Guide
    As you are in Stoke-on-Trent maybe your system is set to use the comma as decimal separator.
    If it's that, you must replace the comma by semi-colons in the formulas (you may see them in my screenshot).
    Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 09:27:53

  • How to set default value for a drop down in Mobile Application Studio

    Hi,
    We have a requirement in which for a drop down - Transaction type (Activities), the value should be defaulted to 'Visit' and the Activity Category should be 'Sales Visit'. I tried debugging the code and got the piece of code where this value is referred, but i'm unable to find out the location where this value is picked from. Also while opening up the properties corresponding to this, there is a default value tab in the properties pane. I tried by giving this default value, but didn't work. When I'm trying to revert the changes i've made in the property, it is showing up an error.
    Any pointers on this would be of great help.
    Thanks in advance,
    Rasmi.

    Hi Rasmi,
    You can default the process type field of BOACTIVITY by different ways-
    1.In BOL, business object BOACTIVITY loaded event, check the parameter bIsNew and then default the value of process type if you want it only for new activities.
    Other attributes currently get defaulted in the attributechanged event of BOACTIVITY where field is processtype.So if processtype is defaulted it will try to default other attributes based on that.It will pick values from the customizing maintained in SPRO->CRM->Transactions->Basic Settings->Define Transaction Type->Customizing Header.
    2.You can also do defaulting in the UI.If you want to default one field based on a value selected for drop down, then write the code in the onselected2 event of the drop down.
    In your specific case, best way is to use option 1.
    Regards
    Vivek

  • Restricting values on the drop down list, while creating a PO

    Hello SAP Experts,
       Could you help me with the following.
      While creating a PO (ME21N), based on the Account Assignment Category(KNTTP) entered , I have to restrict the values in the drop down list for selecting the material group (MAKTL). I have searched some in SDN, but couldn't find anything suitable. Appreciate any help.
    Thank you,
    Sorab

    Could anyone tell me , if it is possible. Has anyone tried this before.
    Thank you,
    Sorab

  • Default values for dependent drop down menu

    Hi!
    I did create an insert record page that lets the user put in information using text fields. In addition the form has a dependent drop down menu for a category and then depending on the chosen category, the user is presented with choices in a second drop down menu for subcategories.
    The insert of the record itself works fine.
    The records are then listed in a table. A link to a details page should then list all fields of a chosen record. I have another form sporting them dependent drop down menus again. Since I retrieve a record from the database I would like to have the drop down menus default to the values stored in the database.
    But whatever I tried the menus always default to the respective first entries in each menu.
    I tried to use the "select value equal to" field in the "insert record" for the category and the "Default detail value" field in the dependent drop down item for the subcategory field.
    Any pointers anybody?
    Thanks in advance
    Juergen

    Hi there I cannot understand your request fully but I think I understand....
    I think I have done nearly exactly what you need
    I will try to explain
    for a start I am working on a art gallery site that has many different artists and many different paintings
    I am able to add a new artist and have that artist name appear automatically in a dropdown menu on my add painting form page so that when I add a new painting I do not have to type the arrtists name every time
    I am not sure this is what you need but I think maybe....
    (i have another site that displays different categories of jewellry... with a form that has same dropdown and can choose product category.... but the process is the same)
    the way I did it was to first create an 'artist_info' table in my database and an 'add artist page' pretty simple
    Then an painting_pnt table in my database and an 'add painting' page with a form that contains a dropdown menu that is dynamically populated from the artist_infotable... label from the artist_name field value from the artist_id field so the form uses two recordsets.......
    Then in my painting_pnt table I have a field that stores the artist_id
    So when I add a new artist..... the name automatically appears in the dropdown menu when I add a new painting I choose the artist name and then later I can filter recordsets on my detail pages using the id_artist....
    there is a lot more to it as well but that should get you started
    I hope this helps
    If you have any questions at all I will try to explain better
    takiteasy

  • How to get selected value of a drop down list in CO?

    Hi All,
    Could you plz provide me the code for getting the selected value from the drop down list in CO?
    Thanks
    Debashree

    use pageContext.getParameter("paramName");
    Regards
    Srini

  • How can we get a value in a drop down box without refreshing the page

    In my application i am having 14 drop down boxes. On selcting a particular value in a drop down box i am doing its corresponding functionality. I would like to get these values without refreshing the page each and every time i select a text box, Is it possible to get these values without refreshing the page each and every time.
    Raghu

    There is a new hype going on called AJAX. It is either that, or dumping a lot of information in javascript arrays and reading the information from there when you make selections. I would choose AJAX.

  • How to set a Default Value in the drop down on Account Creation ?

    Hi,
    i have to set a default value in the drop down as soon as a User in a particular business role clicks on New Account. I have written the following code in do_prepare_output method. But this code is executed in the 2nd server round trip after entering some value or pressing enter. so i am not getting as soon as user clicks on the New Account.
    How to set that default value when user clicks on New Account ? and where should i code ?
      IF lv_icwc_profile = 'ZCSALESPRO' or lv_icwc_profile = 'Z_SALESPRO' .
      try.
                  lr_entity ?= me->typed_context->header->collection_wrapper->get_current( ).
                  lv_current = lr_entity->create_related_entity(
                                                  iv_relation_name = 'BuilRolesRel' ).
                                 lv_current->set_property(
                                    iv_attr_name = 'PARTNERROLE'
                                    iv_value     =  'BUP002' ).
                   CATCH cx_sy_ref_is_initial cx_sy_move_cast_error
                   cx_crm_genil_model_error.
                   return.
            ENDTRY.
    Thanks and Regards
    Raman Khurana

    Hi,
    I have some idea abt it, it is also used in account life cycle.
    Please refer SAP note 1097651, Defaulting a life cycle stage.
    Let me know if useful.
    rgds,
    Vinay

  • Getting the value from a Drop Down Box

    I'm working on a database project to keep track of our Blackberrys. The problem I'm having is entering the values for two drop down boxes. The page I'm working on enters the FirstName, LastName, Department, and Location. Department and Location have thier own Primary Keys and are foreign keys in the Person table. Departments and Locations are aligned by numbers like 1 = Ohio, 2 = Chicago. They
    don't automatically increase. The problem I'm having is entering them as a foreign key in the Person Table. I'm not sure if I use a getValue or getSelected or some other code to get the values to populate in the Person Table. I just keep getting a can't add department or location to table.
    public String newUser_action() {
    // TODO: Process the button click action. Return value is a navigation
    // case name where null will return to the same page.
    if (personDataProvider.canAppendRow()) {
    try {
    RowKey rowKey =
    personDataProvider.appendRow();
    personDataProvider.setValue(
    "DBO.PERSON.FIRSTNAME", rowKey,
    firstName.getText());
    personDataProvider.setValue(
    "DBO.PERSON.LASTNAME", rowKey,
    lastName.getText());
    personDataProvider.setValue(
    "DBO.PERSON.DEPTID", rowKey,
    department.getSelected());
    personDataProvider.setValue(
    "DBO.PERSON.LOCATIONID", rowKey,
    location.getSelected());
    personDataProvider.setValue(
    "DBO.PERSON.BEGINDATE", rowKey,
    newDate.getText());
    //personDataProvider.setValue(
    "DBO.PERSONDEVICE.AQUIREDATE", rowKey,
    newDate.getText());
    personDataProvider.commitChanges();
    info("New User " + newUser.getText() +
    " added to USER table");
    newUser.setText(null);
    } catch (Exception e) {
    log("Cannot add new User ", e);
    error("Cannot add new User: " +
    e.getMessage());
    } else {
    log("Cannot append new User");
    error("Cannot append new User");
    return null;
    }

    Sun's databound components tutorial may prove helpful to you.

  • I recently updated to the newest version of Flash (17.0.0.134) and I have a MacBook Air, running OSX. Ever since the update I can no longer select drop down menus or get Netflix to run properly. Has anyone else had this issue/know how to resolve it?

    I recently updated to the newest version of Flash (17.0.0.134) and I have a MacBook Air, running OS X and I have Safari version 8.0.4.  Ever since the update I can no longer select drop down menus or get Netflix to run properly. Has anyone else had this issue/know how to resolve it?

    1. System Preferences > Flash Player > Advanced > Delete All
        Press “Delete All” button under “Browsing Data and Settings”.
    2. Install Adobe Flash Player.
        System Preferences > Flash Player > Updates
        Press the “Check Now” button.
        http://get.adobe.com/flashplayer/
        Download it and quit Safari from Safari menu in the menu bar.
        Follow the prompts to install Adobe Flash Player.

  • How can I add values on a Drop Down by Index Webdynpro Element?

    Hi every body
    Can anybody help me?
    How can I add values on a Drop Down by Index Webdynpro Element?
    How can I invoque my element on the Implementation Webdynpro?

    Hi Jesus,
    You can add elements to your DDbyIndex like this:
    //Example: Popular un Dropdown by Index usando Nodos de contexto  
    // NODE[Card: 1..n, Sele:1..1]  Si es obligatorio;            ||    NODE[Card: 0..n, Sele:0..1]  Si no es obligatorio y se puede dejar en blanco
    //Assuming we created a node called "Source", with a string attribute called "Texto" binded to the dropdownbyindex
    for (int i = 1; i <= 101; i++)
         ISourceElement sourceElement = wdContext.createSourceElement();
           sourceElement.setTexto("Text number "+i);
           wdContext.nodeSource().addElement(sourceElement);
    Regards.
    Julio Herrera

Maybe you are looking for

  • Updating quantity in sales order using api

    Hi all, SET SERVEROUTPUT ON; DECLARE v_api_version_number NUMBER := 1; v_return_status VARCHAR2 (2000); v_msg_count NUMBER; v_msg_data VARCHAR2 (2000); -- IN Variables -- v_header_rec oe_order_pub.header_rec_type; v_line_tbl oe_order_pub.line_tbl_typ

  • Attributes in dimension

    Hi there, This is more of a question around dimension modelling. Should we be adding attributes of a master data info-object as part of the dimension even if the master data info-object is already part of the same dimension? e.g. if material group is

  • JTextArea doesn't loose the focus

    Hi everybody, I programmed a graphical interface with two JTextAreas and six JTextFields. Using the program means that I delete the text of both JTextAreas and paste new text. An algorithm calculates the results. After that I insert new text and star

  • DTP (Data Transfer Process)

    Hi, I would like to know more about DTP (Data Transfer Process), how can i use it to replace infosources, transfer rules and update rules in just one transformation. I will be very grateful for your comments and your help... Thanks and regards!

  • Find installation path of the LV application

    I want to find the installation path of the LV application. I have aplication already installed in the system. Lets call it applic.exe file. I want to find in which directory it is installed. I need to obtain this information programatically, probabl