Note that there are some explanatory texts on larger screens.

plurals
  1. PODropdown selectedindex not triger when used jquery
    primarykey
    data
    text
    <p>I have used jquery to give effect for my dropdown but after inserting jquery i cant get the selectedindexed changed function working. But when i remove the jquery, then all seems to be working fine. </p> <p>Another thing, after applying jquery in the dropdown, all the items in the dropdown are shown as list item 'li' instead of options.</p> <p>I have tried using javascript function as well but same happens whenever I use jquery in the drop down. </p> <p>Code goes as:</p> <pre><code>&lt;asp:DropDownList ID="DropDownProducts" Width="150px" CssClass="RegistryDrop" runat="server" AutoPostBack="True" OnDataBinding="dropprodsbinding" OnSelectedIndexChanged="DropDownProducts_SelectedIndexChanged" DataTextField="Name" AppendDataBoundItems="True" DataValueField="id"&gt; &lt;/asp:DropDownList&gt; </code></pre> <p>code behind code goes here:</p> <pre><code>function getSelectOptions(parentid) { var select_options = new Array(); var ul = document.createElement('ul'); $select.children('option').each(function () { var li = document.createElement('li'); li.setAttribute('id', parentid + '_' + $(this).val()); li.innerHTML = $(this).html(); if ($(this).is(':selected')) { $input.val($(this).html()); $(li).addClass(opt.currentClass); } ul.appendChild(li); $(li) .mouseover(function (event) { hasfocus = 1; if (opt.debug) console.log('over on : ' + this.id); jQuery(event.target, $container).addClass(opt.hoverClass); }) .mouseout(function (event) { hasfocus = -1; if (opt.debug) console.log('out on : ' + this.id); jQuery(event.target, $container).removeClass(opt.hoverClass); }) .click(function (event) { var fl = $('li.' + opt.hoverClass, $container).get(0); if (opt.debug) console.log('click on :' + this.id); $('li.' + opt.currentClass).removeClass(opt.currentClass); $(this).addClass(opt.currentClass); setCurrent(); hideMe(); }); }); return ul; } </code></pre> <p>hoping to get some solution. thank you</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload