jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts

  • riyasrawther
    Participant

    I found a small solution for this….
    1. Create a hidden field to store the value of the combobox
    2. Use event.args.item.value to change the value of the hidden field.

    // trigger the select event.
                    $("#combobox").on('select', function (event) {
                    var elem = document.getElementById("mytext");
    elem.value = event.args.item.value;

    in Body

    `<form class=”form” id=”form” target=”form-iframe” method=”post” action=”echo.php” style=”font-size: 13px; font-family: Verdana; width: 650px;”>
    <div name=”list” id=”combobox”>
    <input name=”productvalue” type=”hidden” id=”mytext”>
    <input style=”margin-top: 10px;” type=”submit” value=”Submit” id=”sendButton” />
    </form>`

    echo.php

    <?php
            echo "Wrong Data =";
    	echo $_POST["list"];
    	echo "<br />";
    	echo "Value through hidden feild =";
    	echo $_POST["productvalue"];
    	
    ?>

    hope this will work for someone 🙂


    riyasrawther
    Participant

    Thank you very much….

    in reply to: Update Tables with dropdown Update Tables with dropdown #60930

    riyasrawther
    Participant

    Thank you for the reply.

    But the answer is not helped me. i need to add two more drop-down list to a form. The displayMember should be “ProductName” and the valueMember should be the primaryKey “ProductID” from “Products” Table.

    Another dropdown dynamically populated from another Table called “Categories”. The valueMember should be the primary key (ID) and the Display-Member should be a column.

    how can I achieve that?
    Thanks

    Riyas Rawther

Viewing 3 posts - 1 through 3 (of 3 total)