Making combo box write variables

Hi
I am a dynamic site newbie, but have been making simple animations with Flash for some years.
I have got a friend to give me a leg up to create a flash page full of input text boxes that write to a text file via PHP and are then dispayed in dynamic text boxes. ( http://www.thepastafactory.co.uk/forsale.html ) I want to replace some of the imput text boxes with combo boxes. eg if the combo box has the options of say "rigid" or "trailer" it would write which ever was selected in the text file so this would be displayed in the dynamic text box for the end user to see. It seems very simple but I have looked all over the options for combo boxes and can see no mention of variables.
Can anyone explain to me in simple terms how I can achieve this.
Many thanks
Ralph

As a simple example for yourself, open a new file and add a combo box and a dynamic textfield to the stage.  Assign them instance names of my_cb and cbTextField, respectively.  Then add an actions layer and place the following code in it...
// Add Items to List.
my_cb.addItem({data:1, label:"First Item"});
my_cb.addItem({data:2, label:"Second Item"});
my_cb.addItem({data:3, label:"Third Item"});
my_cb.addItem({data:4, label:"Fourth Item"});
var listenerObject:Object = new Object();
listenerObject.change = function(eventObject:Object) {
      trace(my_cb.selectedItem.data);
      cbTextField.text = my_cb.selectedItem.label;
my_cb.addEventListener("change", listenerObject);

Similar Messages

  • Combo box with bind variable from popup

    Hi.
    I had two comboboxes on a form, one having a bind variable. It works great, with the first one as bind field.
    But i want to have the first LOV to be a POPUP. So, the second LOV (combo box) needs to be refreshed when a user has picked a value from the popup list. When i do that, the second LOV is not refresehed...
    Is there a way to do this?
    (3.0.9.8.3.A)

    Hi,
    This was a bug and is fixed in 30984.
    Thanks,
    Sharmila

  • "Shared Variable Control" combo box on Front Panel is empty after Build

    Hello;
    I have a project using shared variables and the DSC module. I am working on building a .exe application now that the project seems to run well.
    I have several places on the front panel where I have shared variable controls. These combo boxes allow the user to click the drop down button and browse the list of shared variables in the project, as well as "browse". When I run the VI from the project, the combo boxes fully populate with all of the deployed tags in the project (I have only one .lvlib in the project).
    When I build the project and run the executable, the only item in the combo box list is the "browse..." selection. I can click on that and browse to my variables, but it is much more time consuming to do so than to simply select the desired variable from the drop down list.
    So, how can I populate the list of shared variables from a particular library ino the Shared Variable Control combo box in a project build?
    A couple of things I have done to try to esolve th problem are ensure that the "Enable Enhanced DSC Run-Time Support" box is checked in the advanced tab of the build window, added the appropriate .lvlib file to the "Dynamic VI's and SUpport Files" window under the "Source Files" tab of the build window, and properly deployed the tag library programmatically in the project.
    Thanks,
    Michael Hampson
    Michael Hampson
    President
    XL Automation, Inc.

    Hi Michael,
    What you see in the development environment is to make it easier for developers, and as far as I know, there's no way to automatically populate the shared variable control during run time in an executable.  The reason being that the shared variable control would have no way to know which process it should be using to get the variables from.  The attached vi demostrate how you can acquire the list of shared variables in a process.  You can also set the default values of the shared variable control by right clicking it on the front pannel, go to Data Operations->Make Current Value Default.  I can do some more research on this, but I'm about 95% sure that there's no way to convert the array of shared variables to populate the shared variable control, as the shared variable control is a special type of xControl.
    Yi Y.
    Applications Engineer
    http://www.ni.com/support
    Message Edited by Yi Y on 07-02-2007 01:27 AM
    Attachments:
    SharedVariableList.vi ‏15 KB

  • Programmatically update Combo box won't update its Local variable

    Hello all,
    I followed a tutorial from NI website and programmatically edit items in a combo box. It worked successfully but not for the Local variables. Local variables still retain items that it had before.
    Any suggestions ?
    Thanks !
    Solved!
    Go to Solution.

    You need to programmatically update the value property in order to change what the local variable will return, the value that you will wire doesn't have to match with one of the Strings[] array.
    Perhaps you need to do something like this to update your value to change from "Two" to "Five".

  • Combo box with multiple variables pre populating multiple fields and max value validation script help

    I am creating a pdf form that will be used as a calculator, and my javascript knowledge is pretty rudimentary. I can do the simple things, some of what I need to do is over my head.
    1. I believe I need to use a combo box to pre populate certain fields. I have 13 variables in the dropdown to choose from, and whatever the client chooses will pre populate three other fields (and each of the 13 variables will populate those three fields differently). I'm not exactly sure how to go about doing this. Is it custom keystroke script or does it require a document script? Also, I'm guessing that whatever script will be a series of if/then statements, correct?
    2. Once all the fields have been populated (be it pre population or filled in by the customer), I need to calculate the answer which is not my main problem—I already have the proper calculations in place and they work. The problem is that the answer has a maximum value even if the actual value goes over that max number. So, the actual answer is 14 but the max value can only be 12. How do I get the calculation to replace that actual number (14) with the max number (12)? Is that in the validation tab or should that go elsewhere?
    I feel like I know just enough to be dangerous but not terribly effective. Any help is appreciated.  
    Thanks!

    1. There is a tutorial on this here:
    http://acrobatusers.com/tutorials/change_another_field
    2. To set the maximum value to 12, try this as the custom calculation script for the field:
    //Custom calculation script
    //Get value of text field
    var a = this.getField("Text1").value;
    //If it is > 12, then make it 12
    if (a > 12){
    a=12
    event.value = a
    You need to replace "Text1" with the name of the field in your form.

  • AS3 - Combo Box making a hint for each item

    Hi Guys,
    I'm stumped. It might be something simple I'm doing wrong.
    I have an array populated by XML in a function by doing the following inside the function:
    first_special.addItem({label: xmlMenuFile.item.headers[i],data:
    xmlMenuFile.item.descriptions[i],data2: xmlMenuFile.item.hints[i]});
    The problem I'm having is trying to figure out a way so that the "data2" will fill the text field "hint_txt" on ROLL_OVER of that items name in the list.
    I've tried to placing an event listener into the function that populates the combo box but nothing helps
    // this populates the combo box label and data with the Loaded XML File. This works
    function changeHandler(ev:Event):void
         menuText_mc.heading1_txt.text = ev.currentTarget.selectedItem.label;
         menuText_mc.description1_txt.text = ev.currentTarget.selectedItem.data;
         heading1 = ev.currentTarget.selectedItem.label;
         includePrice1_mc.visible=true;
    // trying to figure out how to activate the 'hinting' function when you ROLL_OVER EACH ITEM in the 'first_special" combo box
    // and when rolling over it trace 'hello'. This DOES NOT WORK.
    first_special.addEventListener(MouseEvent.ROLL_OVER, hinting);
    function hinting(e:MouseEvent):void{
    // Should trace "hello" everytime I Roll_OVER an item in the Combo Box.     
         trace("hello");
    // calls the changeHandler function and works correctly
          first_special.addEventListener(Event.CHANGE, changeHandler);
    Any help with this would be great.
    Thanks

    For the hinting functionality, I think what you want to set up would be...
    import fl.events.ListEvent;
    function hinting(e:ListEvent):void{   
             var rowIdx:uint = e.rowIndex as uint;
             hint_txt.text = first_special.getItemAt(rowIdx).data2;
    first_special.addEventListener(ListEvent.ITEM_ROLL_OVER, hinting);
    What you had would only react to rolling over the main component, not the items, and that rollover wouldn't begin to happen until you selected an item since you buried the listener inside the change function.  Keep the listener out in the open.

  • How to retrieve data in Combo box?

    :mad; I need to do a form for delivery order. Just fill some
    personal data and order of product. Inside I have some combo box of
    product, but I need save the record into txt file (just once time)
    then need to retrieve the data from txt file onto combo box. I have
    attached the code, I don't know which part got wrong, anybody who
    get help me?

    "roy16" <[email protected]> wrote in message
    news:[email protected]...
    >
    I need to do a form for delivery order. Just fill
    some personal data
    > and
    > order of product. Inside I have some combo box of
    product, but I need
    > save the
    > record into txt file (just once time) then need to
    retrieve the data from
    > txt
    > file onto combo box. I have attached the code, I don't
    know which part got
    > wrong, anybody who get help me?
    >
    > Combo box code :
    > controls := wcGetControlList()
    > listing := "Choose an Item"^Return^"Hot
    > Chocholate"^Return^"Tea"^Return^"Coffee"^Return^"Low fat
    > Milk"^Return^"Full
    > Cream Milk"^Return^"Orange Juice"^Return^"Purified
    Water"
    > id_list := wcDisplayControl(350, 350, 150, 21,
    "ComboBox", "wcS")
    > propList := wcGetPropertyList(id_list)
    >
    >
    > Save the data from Combo box list :
    > data := wcGetPropertyValue(id_list, "value")^Return
    data at this point will be some number between 0 and 7 and
    your appended
    return.
    > WriteExtFile("list2.txt", data)
    >
    > Read the data from txt :
    > data := ReadExtFile("list2.txt")
    This will again be a string that contains a number and a
    return.
    > Convert string to list :
    > id_list := [:]
    Before, you are populating id_list with a single number that
    is the _ID_ of
    the winCtrl . Now, you are changing it to an empty property
    list. Why?
    > AddProperty(data^id_list,controls ,GetLine(data,1))
    The first parameter of AddProperty is supposed to be the name
    of a variable
    which is a property list. As such, you couldn't use a
    concatenated
    expression there. Even if you could, an Authorware variable
    cannot begin
    with a number, which data always will in this instance. It
    also cannot
    contain a return. _And_ the characters "[:]" are not valid
    parts of a
    variable name either. Next, you're trying to add a property
    that looks
    something like:
    "Button\rCheckBox\rCheckListBox\rColorCombo\rComboBox\rDriveCombo\rEdit..."
    While a property list _can_ have strings instead of symbols
    as the keys to
    the values, this is not documented or officially supported.
    Even if it
    were, you _cannot_ have a key with returns in it, and I have
    no idea why
    you'd want to!
    Here are the steps you should be using:
    1) Create your WinCtrl and store its ID in a regular numeric
    value (I'll
    call it wcID for convenience)
    2) Set its Items property to listing.
    3) Check for the existence (FileType) of your file with the
    value of the
    winCtrl in it. If it exists, set the value property of wcID
    to the contents
    of the file.
    4) You're using wcS as your change event, so set up a
    conditional on false
    to true with wcS as the condition.
    5) Inside that response, write the "value" property (without
    the return) of
    the wcID control to file.
    HTH;
    Amy

  • Using Combo Box in Web Report 6.0

    Has anyone had success using a combo box on the parameter form in
    a Reports 6.0 web report? I can successfully use a list of
    values, but this requires that the user must select an entry.
    Some parameters may be null. Current environment is NT4 SP4,
    OAS4.07, Oracle Developer Server 6.0.
    Thanks!
    S Hatch
    null

    Hello,
    You need to create a client-side PL/SQL package as Program Units for your report. In this package you can define a package variable to hold and share your file handle, and create functions to open, write, and close the file. You can call these functions from the Before Report, Formula, and After Report triggers in your report.
    Regards,
    The Oracle Reports Team --skw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Analyzer 6.5: Linking Table to a combo box

    I created a combo box containing all month from January to December.If the user select for example December, he should get on the report the actual month (=December) and the privious month (=November).How can I do this with analyzer?Additional question: How can I solve this problem when the user select January and he should get January and December on the report?Help is very appreciated.

    Depending on how your outline is set up, there are a few different ways you can do this.For starters if you only need to see current month and previous month, then you might want to look at using substitution variables.Assuming you are not looking to use substituion variables because you are looking to give your users a solution that allows them to go back more than one month, you might want to try something like the following. (It might seem a bit long, but since you are dealing with the time dimension and would only need to repeat the process once for each month, it shouldn't take too long to put it in place.)Here's what you can do:When selecting members for your combo box, you should select the top member of you Time Dimension, for instance 'Year Tot'.Once 'Year Tot' shows on the right side of the selection list, you can right click on it and a menu will come up asking if you also want to include children, descendents, etc.; choose at the bottom of the list "Select Subset". Once there, you want to choose from the drop down, 'Expression Contained is', and type the member name 'Nov', (click the add button), then choose 'Expression Contained is' and type the member name 'Dec' (click the add button). Now go to the advanced button and change your connector from 'And' to 'Or'. Click okay.(Basically you are creating a subset that will return November Or December)You now have a member added to your drop down box called "Year Tot" (or whatever you time dim member name is) Rename 'Year Tot' to "Dec" and click okay. You now have a member in your drop down list called 'Dec' that really represents a subset which includes both Nov and Dec. When users click on Dec in the combo box they will see Nov and Dec in the grid.You would then repeat these steps for each month.As far as January showing The current year January and the previous year December, that can be a little tricky. I'm assuming your time dimsnsion is NOT set up as a fiscal year cross over model and instead you have one dimension with your months and then a scenario type dimension with your years. One solution is to add a 13th month to your month's dimension that does not consolidate. The 13th month can be named 'Prior Yr Dec' You would then write a calc script in Essbase to copy your Dec numbers to Prior Yr Dec. (ie "Prior Yr Dec"->2004 = Dec->2003)Once you have this done, you could easily implement the steps above and achieve the results you are looking for.Best Regards,

  • Email Form with Combo box

    Hi guys,
    I need to add a actionscript and php code to the attached
    codes. As you can see I already have the codes for the name, email
    address, message etc...what I need is how to write the codes for
    these six combo boxes:
    Arrival Date: Day, Month, Year
    Departure Date: Day, Month, Year

    again, you assign a variable.  the selected radiobutton's data and/or label isn't going to magically be sent to the php file.
    for example, if you have sendLV and receiveLV loadvars instances, you can use:
    sendLV.rbData=yourradiogroup.selection.data;
    sendLV.yourothervariables=yourothervariables;
    sendLV.sendAndLoad("yourphp.php",receiveLV,"POST");

  • Combo box/Array Help

    I am fixing a bug on an app that someone else developed but
    there is a huge bug in it. There is a combo box that is being auto
    populated with the school year.
    So it looks like this...
    2004-2005
    2005-2006
    2006-2007
    2007-2008
    The problem is that the default selection is the 2004-2005
    school year when it should be 2006-2007
    Here is the code:
    //Setup Year combo box
    var myArray:Array = new Array();
    var intCurrentYear:Number = 0;
    var myDate:Date = new Date();
    for (i=2004; i<=myDate.getFullYear(); i++) {
    myArray.addItem({label:i+" - "+(i+1), data:i});
    if ((i == myDate.getFullYear()) &&
    (myDate.getMonth()>=5)) {
    intCurrentYear = i-2004;
    trace("current year1:" + intCurrentYear);
    trace("i=" + i);
    Competencies.cboSchoolYear.dataProvider = myArray;
    Competencies.cboSchoolYear.selectedIndex = intCurrentYear;
    The variable "i" should equal 2006 and the variable
    intCurrent year should equal 2
    I didn't write any of this code and i'm going crazy trying to
    figure out how to fix it.
    Please help!!
    Thanks

    Look this code.

  • How to populate data in the data table on combo box change event

    hi
    i am deepak .
    i am very new to JSF.
    my problem is i want to populate data in the datatable on the combo box change event.
    for example ---
    combo box has name of the city. when i will select a city
    the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
    its urgent
    reply as soon as possible
    thanks in advance

    i am using Rational Application Developer to develop my application.
    i am using a combo box and i am assigning cityName from the SDO.
    and i am declaring a variable in the pageCode eg.
    private String cityName;
    public void setCityName(String cityName){
    this.cityName = cityName;
    public String getCityName(){
    return cityName;
    <h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
                        <f:selectItems
                             value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
                   </h:selectOneMenu>
                   <hx:behavior event="onchange" target="menu1" behaviorAction="get"
                        targetAction="box1"></hx:behavior>
    and also i am declaring a requestParam type variable named city;
    and at the onChangeEvent i am writing the code
    public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
    requestScope.put("login",(String)valueChangedEvent.getNewValue());
    and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
    it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
    it is possible that i may not clear at this point.
    please send me the way how my problem can be solved.
    thanks in advance

  • Display data in list and combo box

    hi all....
    how to display data from database in list and combo box? i use MYSQL...
    help me please..... tq...

    1 - Write a query to retrieve the data you want from database
    2 - In a servlet, connect to database, Run the query, scroll through the result set and put the data into a list of Java Objects.
    3 - Set a request/session attribute of that list of objects
    4 - Forward to JSP
    5 - In JSP, create a <select> box, and then use a <c:forEach> loop to generate <option> tags from the list.

  • How can we pass selected combo box value to a jsp pag?

    Hi All,
    I want to pass selected combo box value to a same jsp page's variable.
    i am using javascript
    <select onchange="this.options[this.selectedIndex].text">
    </select>
    this selected value should be invoked for a jsp page's variable.
    Excepting for favorable reply
    Vansh

    select2.jsp
    <script>
    function x()
         alert(document.f.s.options[document.f.s.selectedIndex].text);
         document.f.submit();
    </script>
    <body>
    <form method="get" name="f" action="select2.jsp">
    <select name="s" onchange="x()">
    <option checked>--select--</option>
    <option value="1"> vijay </option>
    <option value="2"> kumar </option>
    </select>
    </form>
    </body>

  • Calling a bean method on select of Combo box item

    Hi
    On select of Combo box item in a form, text fields in the same form should be populated
    dynamically.Is it possible to call a bean method which does this,by calling onSelect() method
    of combo box ?
    Thanks in advance,
    Sridevi

    Uff, sorry!
    I ment that you write some code for the "onSelect" event which sends a request to the server with the selected value: onSelect="self.location.href='<%= request.getRequestURI()%>?selectedVal= ' + this.selectedIndex;"

Maybe you are looking for

  • KM Repository to Store Documents on Content Server

    Dear All, We are running on EP 7.0 and having a content server 6.0. Currently our KM documents are stored on Portal Database I want a repository where i can get all KM Functionality and Uploaded document should be stored in external content server in

  • Mac mini with W7 only

    I have Leonard Snow and W7 dual boot in my Mac mini. What should I do to have W7 as the only OS? Should I just format the OS X partition? Will this cause problems when booting (as it now gives me the option to choose the OS)?. Thanks

  • Excel attachment using Wendynpro application gives error

    Hi All, We have implemented the WebDynpro application which uses the Excel attachment from local PC. This application can attach new Excel attachments & read the existing Excel attachments.  This functionality works fine in our Development Environmen

  • HT4863 Can I use g-mail rather than outlook?

    Can I use g-mail rather than outlook with icloud?

  • Create a Transaction Variant

    Hi Gurus, My requirement is to create a transaction (ZSE16) similar to SE16 the only difference is to disable the Create entries button in ZSE16. I got an approach using Transaction variant but I am struck up with it Guide me how to disable the creat