jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ComboBox › Using a form input field as a combobox
Tagged: combobox control, jqxComboBox
This topic contains 4 replies, has 2 voices, and was last updated by WarLoc3D 12 years, 3 months ago.
-
Author
-
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.
“
”
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 StoevjQWidgets Team
http://www.jqwidgets.com<!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>
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 StoevjQWidgets Team
http://www.jqwidgets.comOkay, thanks for the reply. Was afraid this was the way it is.
-
AuthorPosts
You must be logged in to reply to this topic.