plugin combobox, évènement onchange
Bonjour,
j'utilise jquery avec combobox
http://jquery.sanchezsalvador.com/jq...mboboxapi.aspx
http://jquery.sanchezsalvador.com/samples/example.htm
ça marche nickel mais j'ai juste un souci, je n'arrive pas à mettre un onchange, afin que le choix fait dans la liste déroulante soit interprété comme un a href
voici le code dans mon head
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<script type="text/javascript" src="includes/jquery.js"></script>
<script type="text/javascript" src="includes/jquery.dimensions.js"></script>
<script type="text/javascript" src="includes/jquery.combobox.js"></script>
<script type="text/javascript">
$("#officeItemList").change(function() {
document.location = this.value;
});
$(
function()
{
$('#officeItemList').combobox(
{
comboboxContainerClass: "comboboxContainer",
comboboxValueContainerClass: "comboboxValueContainer",
comboboxValueContentClass: "comboboxValueContent",
comboboxDropDownClass: "comboboxDropDownContainer",
comboboxDropDownButtonClass: "comboboxDropDownButton",
comboboxDropDownItemClass: "comboboxItem",
comboboxDropDownItemHoverClass: "comboboxItemHover",
comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader",
comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer",
animationType: "slide",
width: "150px"
});
}); </script> |
et dans mon body j'ai mis ça :
Code:
<select id="officeItemList" onchange="document.location=this.value;">
mais ça ne fonctionne pas.
Quelqu'un pourrait-il m'aider ? Merci beaucoup.