jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox Using a form input field as a combobox

This topic contains 4 replies, has 2 voices, and was last updated by  WarLoc3D 12 years, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Using a form input field as a combobox #12514

    WarLoc3D
    Member

    Hi,

    I wanted to combine the combox directly into an input field, but it doesnt work (latest version). I couldnt find anything on the topic in this forum, internet or the documentation and maybe the combobox is only restricted to the div element. Maybe i have to overcome this by using jquery but any help on this matter is appreciated. I included a small rundown example which works on divs but not on inputs.

    Using a form input field as a combobox #12525

    Peter Stoev
    Keymaster

    Hi WarLoc3D,

    How did you test with Combobox? Could you paste a code and use the button to format it? Did you set the “name” attribute to the ComboBox’s DIV tag?

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Using a form input field as a combobox #12531

    WarLoc3D
    Member
    <!DOCTYPE html>
    <head>
    <link rel="stylesheet" href="./jqwidgets/jqwidgets/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="./jqwidgets/jqwidgets/styles/jqx.classic.css" type="text/css" />
    <script type="text/javascript" src="./jqwidgets/scripts/jquery-1.8.0.min.js"></script>
    <script type="text/javascript" src="./jqwidgets/jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="./jqwidgets/jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="./jqwidgets/jqwidgets/jqxscrollbar.js"></script>
    <script type="text/javascript" src="./jqwidgets/jqwidgets/jqxlistbox.js"></script>
    <script type="text/javascript" src="./jqwidgets/jqwidgets/jqxcombobox.js"></script>
    <script type="text/javascript" src="./jqwidgets/jqwidgets/globalization/jquery.global.js"></script>
    <script type="text/javascript" src="./jqwidgets/scripts/gettheme.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var data = {};
    var theme = 'classic';
    var source = [
    "NEW",
    "STOCK",
    "TEMPORARY",
    ];
    $("#jqxComboBox").jqxComboBox({ source: source, selectedIndex: 0, width: '250', height: '25px', theme: theme });
    });
    </script>
    </head>
    <body>
    <div>
    <div><input id="jqxComboBox"></input></div>
    </div>
    </body>
    </html>
    Using a form input field as a combobox #12533

    Peter Stoev
    Keymaster

    Hi WarLoc3D,

    jqxComboBox requires a DIV tag to be initialized. It is not possible to initialize it from Input tag. Please, take a look at the help topic here: jquery-combobox-getting-started.htm

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Using a form input field as a combobox #12534

    WarLoc3D
    Member

    Okay, thanks for the reply. Was afraid this was the way it is.

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

You must be logged in to reply to this topic.