[php+mysql] linked combo box in insert form?

Hi all,
I would like to add two list box on the same insert form.
The two list box should be linked each other with a 1:1 relation.
The data in the two compo box could be static data; no need to use
dynamic data here).
Selecting from list box 1 will automatically select the related value
from list box 2.
Vice versa, selecting a value on list box 2 will automatically select
the related value on list box 1.
Is there a way to do this using ADDT?
TIA
tony

>Hi Tony,
>
>did you read my reply to your very similar question "Dependent drop down or not?" in this thread:
>
>Cheers,
>Günter Schenk
>Adobe Community Expert, Dreamweaver
Hi Gunter,
No, I've seen your post just now. :(.
I too I've never seen nothing similar, but the customer said that the
last year another company have done this for him. But I haven't seen
those pages and we can't get the source code :(.
Perhaps a dropdown menu showing two fields could help.
Or, even better, an editable drop down menu that allow you to type
something and it will autocomplete automatically using the first field
or the second field.
Is this possible?
TIA Gunter.
tony

Similar Messages

  • Help with Radio Buttons & Combo Box for Flash Form that sends email

    I'm having a bit of a hard time with a Flash form that I'm working on.
    I've got the basic text fields working fine, but I'm not sure how to retrieve the values from the Radio Button and Menu List components.
    The PHP script pulls the values from the text fields with:
    $contact_name = $_POST['name'];
    $contact_email = $_POST['email'];
    $contact_subject = $_POST['subject'];
    but using
    $radioGroup = $_POST['radioGroup'];
    doesn't retrieve the selected radio button value.
    The radio buttons have a groupName of "radioGroup". The combo box component doesn't even show up in the HTML version, but does in the .swf.
    Can anyone point me in the correct direction to pull these values from these components and get them passed to the PHP form? The native .FLA and the php file are here for reference:
    http://dl.getdropbox.com/u/21984/flashform.zip
    My solution needs to be ActionScript 2.
    Thanks!

    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");

  • [php+mysql] how to get the inserted record ID?

    Hi all,
    I have a standard php page that inserts a record in a mysql
    db.
    is there a way to save the record ID on a session variable
    just after
    storing the new record on the db? I would like to be able to
    get this
    record ID on a specific page where I would allow the user to
    print
    this specific record, by filtering the db by this session
    variable.
    I can use MX Kollection (last version, not PRO).
    TIA
    tony

    >...
    >mysql_query(...);
    >$_SESSION['lastId'] = mysql_insert_id();
    >HTH
    >Micha
    Hi Micha,
    I think that it a bit more complicated.
    I can't find any occurrence of that mysql call.
    I used MX Kollection INSERT FORM function.
    here is the code (partially):
    ===============================
    <? // Load the common classes
    require_once('../includes/common/KT_common.php');
    // Load the tNG classes
    require_once('../includes/tng/tNG.inc.php');
    // Make a transaction dispatcher instance
    $tNGs = new tNG_dispatcher("../");
    // Make unified connection variable
    $conn_test_conn = new KT_connection($tes_conn,
    $database_test_conn);
    // Start trigger
    $formValidation = new tNG_FormValidation();
    $tNGs->prepareValidation($formValidation);
    // End trigger
    // Make an insert transaction instance
    $ins_rl_test = new tNG_insert($conn_test_conn);
    $tNGs->addTransaction($ins_rl_test);
    // Register triggers
    $ins_rl_test->registerTrigger("STARTER",
    "Trigger_Default_Starter", 1,
    "POST", "KT_Insert1");
    $ins_rl_test->registerTrigger("BEFORE",
    "Trigger_Default_FormValidation", 10, $formValidation);
    $ins_rl_test->registerTrigger("END",
    "Trigger_Default_Redirect", 99,
    "2.php?idp1={id_rl}");
    // Add columns
    $ins_rl_test->setTable("rl_test");
    $ins_rl_test->addColumn("nome_rl", "STRING_TYPE", "POST",
    "nome_rl");
    $ins_rl_test->addColumn("cognome_rl", "STRING_TYPE",
    "POST",
    "cognome_rl");
    $ins_rl_test->addColumn("datanascita_rl", "DATE_TYPE",
    "POST",
    "datanascita_rl");
    $ins_rl_test->addColumn("cancellato_rl", "STRING_TYPE",
    "POST",
    "cancellato_rl");
    $ins_rl_test->addColumn("cancellato_data_rl", "DATE_TYPE",
    "POST",
    "cancellato_data_rl");
    $ins_rl_test->setPrimaryKey("id_rl", "NUMERIC_TYPE");
    // Execute all the registered transactions
    $tNGs->executeTransactions();
    // Get the transaction recordset
    $rsrl_test = $tNGs->getRecordset("rl_test");
    $row_rsrl_test = mysql_fetch_assoc($rsrl_test);
    $totalRows_rsrl_test = mysql_num_rows($rsrl_test);
    ?>
    ===========================
    as you can see, all data is processed by other functions in
    other
    included files.... :(.
    I think I need to better understand the TNG engine and try to
    create a
    little trigger that creates a session variable just after
    inserting
    the record in the db.
    I already tried to do so, honestly, but with really poor
    results.
    Ciao Micha. ;).
    tony

  • Combo boxes on web forms

    I'm currently converting a forms v4.5 application onto 9iAS with web forms. I'm have major problems with my user community as combo boxes are no longer supported under web forms and they use them extensively.
    To try and overcome the problem I have converted the combo box into a 'TEXT_ITEM' and set up a LOV called from a button. This works for inserting new records, but when they query back existing records no data is displayed in the text_item boxes.
    Does anybody know how I get the LOV to fire JUST to display back existing single row data.
    Many Thanks
    Jez Thorpe.

    combobox is available on webform, but it did not deliver what a standard combobox supposes to offer.
    e.g., 1) it can display one column and return one valure;
    for emp table, there are ename and empno:
    ename empno
    David M Brown 100
    David M Brown 101
    David L Miller 103
    Then I have to use LOV to display these records of different persons and same name. If you try MS OFFICE, with ACCESS, you will see how nice the combox it is. Of course they are industry GUI standard, forms cannot do it, it is normal.
    2) it does not support partial search as seen on MS Access application
    for ename records in the list,
    David M Brown
    Bill L Kim
    Bill P Kelly
    What is expecting is that if user types in 'D', then the first records should automatically populate into the box's text field; if types in 'B', then the shortened list with the two records beginning with 'B' should be displayed for user to pick.
    This can be seen on MS ACCESS, but not on webforms.
    When we say combobox is available, it is not accurate enough to define the 'availability' of it.

  • Combo Box in Portal Form resets after query

    Hello all,
    I have a portal form based on Stored Procedure. In it I have a Location combo box and Query button in addition to few text items. Users can select location from the drop down list and hit Query button to view the values in for the text items. The query part is working fine. But after query the Location resets to Null (as the LOV which feeds the combo box can have Null). We would like to keep the location they chose to query up even after the query results. Any help is appreciated.
    The Location item is in the parameters of the Stored Procedure. Initially it was IN, later I changed to IN OUT but there is no change in functionality.
    I also removed the ability to accept NULL for the LOV which feeds Location Combo box but now it is displaying the first location on the list after the query, which is even worse.
    Thanks in advance,
    Manohar

    You're catching Exceptions in empty catch() blocks. There might have been an exception, but you won't know if the catch block doesn't do anything.
    Try something like this:
    catch(SQLException e){
        System.err.println( "Problem with db query"+e.getMessage() );
        e.printStackTrace( System.err );
    }in order to see what's going wrong with your code.

  • Linking combo boxes to a table

    I have made a set of combo boxes that allow the user to input a home and away football team and their scores. I have also setup a table with 4 teams in it. How can i link the combo boxes so that EG:
    If Arsenal 2 - 1 Chelsea is a result inputted how can i link it to a table so that Arsenal will go top with 3 points, 2 goal for, 1 against etc
    Basically i need to update the table from the info supplied by the combo boxes???

    we don't tolerate that attitude either....
    besides I gave u guidelines, check the other thread, but u can be sure that nobody will help you if u keep this attitude...
    READ the links I posted in that other thread, work on the issue then come back with questions and post your code so that we know how to help you based on your code..that's how it works here..

  • Default selection in combo box at struts form

    hi friends..i am new person in struts form..this is my prg.. display combo box value in 18. but i want 20...how to write program....plz anybody help me....thank you............
    <%
    for (int index = 18; index < 56; index++)                                                                           %>
    <html:option value="<%=index + ""%>">
    <%=index + ""%>
    </html:option>
    <% } %>

    what you need is field "value" in the select:
    [http://struts.apache.org/1.2.x/userGuide/struts-html.html#select]
    see "value" property
    (found it easily with "struts option selected" on google)

  • Help with linking combo boxes so that some options are made unavailable

    Hello!
    I'm having trouble setting up an interactive PDF form with multiple combo boxes.
    I have designed an interactive PDF form in InDesign CS6 but am doing the final preparation and formatting in Adobe Acrobat XI Pro.
    First of all, I am not sure if I should be using combo boxes or list boxes, but the combo box seemd to look better after I export the PDF and also left the field blank, ready for selection from the drop-down menu.
    Basically I have a list of drop-down lists, but not all combinations are compatible. For example, after maing "Selection 1" in "Combo box 1", I need only "Selection 1", "2", and "3" [out of the total 5] to be available in "Combo box 2".
    I need to be able to apply this algorhythm to the next few combo boxes as well.
    Moreover, I would need some of the checkboxes disabled [the user won't be able to check them at all]when I make a certain selection in some of the combo boxes.
    Needless to say, I don't know any Java, coding or making calculations in LiveCycle Designer, so I don't even know where to begin.
    I have attached a screen grab of my form and what I want to achieve.
    Any help would be very much appreciated.
    Thank you!

    If it is static data, I would suggest you to cache it rather than having it in each of the user session. You can have configuration/code to refresh when needed. Please look at any available caching frameworks (EhCache, OSCache etc...)

  • Link Combo box(drop down) to Column chart

    Hello Gurus,
    I am new to this Xcelsius world...  I have 3 excel books with three different weeks data, i would like to create drop down for thr three week and link to the column bar chart with filter.
    could you please help me any one.
    thanks in adavance
    Muvva

    Hi Anil,
      I am trying to display the data in the spread sheet using the web services. I am able to get the web service as a query in xcelsius and i am trying to insert into excel and then i would to display in the spreadsheet table. I am unable to see the data in the excel and the spreadsheet  action block.
    Muvva

  • Master Detail pages php/mysql  Links

    I have a master/detail page setup that is working properly. I
    am trying ot add a Link to only a few of the detaill pages but not
    to show up on others. I tried to set just do the html in a text
    field but It owuld not come out as link. It did underline it like a
    link.
    I also tried to do a If statement but am getting parse errors
    when I add the html code.
    <? if ($row_detail['link'] {
    echo "<a herf=$row_detail['link']>Expanded
    Detail</a>
    I get a parse error of unexpected <
    Any body have any idea if this is possible and how I might
    get it to work
    Thanks
    Tim

    David
    Getting closer I put in this
    <? if ($row_rscdetail['link']) {
    echo "<a herf='{$row_rscdetail['link']}'>Expanded
    Detail</a>"; } ?>
    Everything is good except it is not a link. It is underlined
    and mouses over but not link.
    The source code from ie is
    <a herf='
    http://www.sflcondos.com'>Expanded
    Detail</a>
    I also put the " " around the link in the table field and
    removed the ' ' from <a herf='{etc}' and it came out in source
    code as
    <a herf="
    http://www.sflcondos.com">Expanded
    Detail</a>
    It has got me stumped
    Thanks for your help
    Tim

  • Inserting special character like apostrophes with PHP/Mysql

    Hi friends,
    I have a problem with php/mysql. I have created a form inton a php page with dreamweaver and when i try to fill the form with a string containing apostrophe ( ' ), i have a error. It seems that the insertion is not possible. Could you have any idea for that. I give you the php dreamweaver code and thank you for your help.
    <?php require_once('Connections/Mainconnect.php'); ?>
    <?php require_once('Zend/Date.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
    if ($theValue=="")
        $theValue="NULL";
    else
        $zendDate=new Zend_Date($theValue,"dd/MM/yyyy");
        $theValue="'".$zendDate->toString("yyyy-MM-dd")."'";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE pers_soc_reg SET field1=%s, field2=%s,
                           GetSQLValueString($_POST['field1'], "text"),
                           GetSQLValueString($_POST['field2'], "double"));

    "Normally, you canot use mysql_real_escape_string without connection to database"
    That is not true at all. Try running the following script.
    <?php
    if ($_POST['submit']){
    $x1=$_POST['test1'];
    foreach ($_POST as $key => $value) {
    if (!is_array($value)){
    $_POST[$key] = mysql_real_escape_string($value);
    extract($_POST);
    echo "The text after 'becomes' should be escaped (\')<br/>";
    echo "$x1 becomes $test1<br/>";
    ?>
    <hr/>
      <form action="#" method="post" />
    Enter some text, including an apostrophe: <input name="test1" type="text"><br/>
        <p><input name="submit" value="submit" type="submit"/>
      </form>

  • Combo box in form manager

    Hi!
    I've made a form in Designer 8 with combo box, tested it (everything was ok) and than upload it to form manger. And here the problem beggins. When I'm writting something in combo boxes field it looks like there wasn't any or sometimes I can write only 10 letters when the Combo Box was set up for 11. Why is that? I want to use Combo Boxes. Is it a bug of FM? Thanks.

    VC,
    Have you had a chance to add an example? I checked your application and could not find the combo box in tabular form.
    Robert
    http://apexjscss.blogspot.com

  • Problem in populating 2nd combo box depending upon the selection of 1st

    Hi all,
    I have 2 combo boxes on my jsp page ,say continent and country . obviously the data in 2nd box is dependant on selection made in the 1st . I'm using MySQL with tomcat 5.0.7 . and JSP.
    The first combo box in one form and the 2nd in another. After submitting first i 'm populating the second combo also.
    But the problem is after submitting the first form the page gets refreshing and i can't see the selected continent in the first combo box.
    The javascript code used follows:
    function callCapture(form)
    var item = continent.cmbContinent.selectedIndex;
    document.country.hidContId.value=continent.cmbContinent.options[item].value;
    document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
    document.continent.target="_self";
    document.continent.submit();
    some one pls help me asap !

    Hi Reegz,
    that's what i'm also doing and i'm successfull till populating the second combo box but how do I keep the previous inputs on the page and reload the page based on the change of a selection box?
    Is their any mistake in the javascript code:
    Here is the code:
    function callCapture(form)
    var item = continent.cmbContinent.selectedIndex;
    document.country.hidContId.value=continent.cmbContinent.options[item].value;
    document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
    document.continent.target="_self";
    document.continent.submit();
    Pls help me...

  • Dynamic LOV/Combo Box

    I need to put an LOV/Combo Box on a form where they can select a date from a list of values. We have reports that our field reps have to submit for the previous friday. I have code to create a combo box. How can I add this to a form or create a LOV with this function:
    DECLARE
         n_NumofDays NUMBER;
         testdate VARCHAR2(50);
         selectedyear VARCHAR2(50);
         firstdayofyear VARCHAR2(11);
         firstfridayofyear VARCHAR2(11);
         upcomingfriday VARCHAR2(11);
         currentdate DATE;
         thisyear VARCHAR2(50);
         selected VARCHAR2(8);
    BEGIN
         selectedyear := TO_CHAR(SYSDATE,'YYYY');
    firstdayofyear := '01-JAN-' || selectedyear;
    firstfridayofyear := NEXT_DAY(firstdayofyear, 'FRIDAY');
    upcomingfriday := NEXT_DAY(SYSDATE, 'FRIDAY');
         htp.p('<select name="weekenddate">');
         htp.p('<option selected value="'|| firstfridayofyear || '">Friday '|| firstfridayofyear || '</option>');
              currentdate := firstfridayofyear;
              thisyear := selectedyear;
              x :=0;
         WHILE SelectedYear = ThisYear LOOP
         IF currentdate = upcomingfriday THEN
              selected := 'selected';
         ELSE
              selected :='';
         END IF;
         htp.p('<option '|| selected || ' value="'|| currentdate || '">Friday '|| currentdate || '</option>');
              currentdate := NEXT_DAY(currentdate, 'FRIDAY');
              thisyear := TO_CHAR(currentdate,'YYYY');
         END LOOP;
         htp.br;
         htp.p('</select>');
    htp.br;
    htp.p(n_NumofDays);
    END;
    Look forward to your answer.

    Rebecca:
    This is the standard call for a Portal-built form:
    PORTAL.wwa_app_module.link (
    p_arg_names => PORTAL.wwv_standard_util.string_to_table2('_moduleid:loc_code'),
    p_arg_values => PORTAL.wwv_standard_util.string_to_table2('2728668008:BHM'));
    The 1st parm is required, it id's the form to call; the 2nd parm, LOC_CODE, I'm having to hard-code. It relates to the specific page from where this form is called; therefore, I've several places throughout the site where I call this form and the LOC_CODE value is different. I've a field on on this form that gets populated with this value when the form comes-up, but I have it hidden. I can also use this value to drive the contents of a combo-box on the form. That's what I really needed to do; restrict the selection there based on where the form was being called from.
    Hope that helps...
    Ed in Tampa

  • Problem with combo boxes and the reset button in certain situations

    Hi Everyone,
    i have a problem to make the reset-button function properly in an what-if analysis dashboard.
    The dashboard uses two combo boxes that are not visible at the same time. In my application the second combo box only appears when a dedicated menu (label based menu button) has been activated.
    So i have combo box 1 when menu A is active an dand combo box 2 when menu 2 is active.
    After starting the dashboard initial values are fine. If you then directly change to menu 2 (seeing combo box 2 with
    the correct default value) and press the reset button, the dashboard returns to the initial view, showing
    the menu 1 with the correct default value. If you now switch back  to menu 2, you will see, that the combo box 2
    is empty (i.e. nothing selected).
    I also tracked the destination cells for the combo box value results as well as the source cells for the "selected item" and the
    destination cells for the "Insert Selected Item". All this values seem to be correct. Therefore i assume that
    this is an issue of event handling. Maybe the combo box 2 does not refresh its selected value because it is already
    invisible when the values are restored.
    This case can easily be simulated by placing two combo boxes and a push button (that changes the visibility of
    the combo boxes) and the reset button on the canvas.
    Maybe someone can help. I am able to provide a test xlf, if neccessary.
    Thanks,
    Oliver
    P.S. I am using Xcelsius SP4 (Version 5.4.0.0)

    Hello Debjit_Singha_86,
    thank you for your support. At the moment i have the following setting:
    label based menu
    - General: Insertion Type "value" from a list of ID's for the menu-items to a dedicated cell (current menu ID, say tab1!$A$1)
    - Behavior: Selected item (position) fixted to item 1
    hidden combo box
    - General: Insertion Type "position" to a dedicated cell with the current choice (say tab1!$B$1)
    - Behavior: Selected item (position) to the same cell (tab1!$B$1)
    Can you give me a hint on how to connect the two components according to your solution, so that the label based menu sets the default for the hidden combox box only in case, that the reset button is pressed?
    Thanks,
    Oliver

Maybe you are looking for

  • Operating temperature high?

    I downloaded smcFancontrol and Istat Nano and it's telling me that my current operation Temperature is 52C (125F). On the Macbook pro website it's saying that the operating temperature is  50° to 95° F (10° to 35° C). Could my macbook pro be overheat

  • Access to InitialContext by username and password

    hi, I have implemented a web application, which gets resources via JNDI. I am accessing JNDI by username and password: Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");

  • Norton remove an AIR application

    Our product Peaya Paper is based on AIR 2. One of our users recently updated Peaya Paper but his Norton removed it automatically due to "The program was behaiving suspicously on  your computer". In this update we only added the 'trash' function and e

  • Transaction isolation issue in 6.1

    How do I specify tx isolation in WebLogic 6.1 for local entities?           I've tried a stanza in weblogic-ejb-jar.xml like this:           <transaction-isolation>           <isolation-level>TRANSACTION_SERIALIZABLE</isolation-level>           <meth

  • Is there a way to backup iphone when error message says restore needed

    My iphone is with Verizon Wireless.  This morning I lost service to the phone and when I attempted to restart it it has a message saying restore needed, telling me to plus it into iTunes.  I've plugged it in to iTunes but iTunes is not recognizing my