Search Results

Search found 17637 results on 706 pages for 'jquery autocomplete'.

Page 8/706 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to “unbind” .result on Jquery Autocomplete?

    - by Cesar
    I have this code: $("#xyz").unautocomplete().autocomplete(dataVar, { minChars: 0, width: 400, matchContains: true, highlightItem: true, formatItem: formatItem, formatResult: formatResult }) .result(findValueCallback).next().click(function() { $(this).prev().search(); }); I call this code many times and the first call works correctly, but after he calls findValueCallback many times, not once more. The unautocomplete don't clear .result What I have to do for call findValueCallback once? Sample Code: var niveis01 = []; var niveis02 = []; var niveis03 = []; $(document).ready(function(){ carregaDadosNivel1(); }); function carregaDadosNivel1() { $.ajax({ url: "http://.....", cache: true, type: "POST", dataType:"json", success: function(data){ ... niveis01 = data; habilitaComboNivel1(); ... }, error: function(xhr, ajaxOptions, thrownError){ ... } }); } function habilitaComboNivel1() { function findValueCallback1(event, data01, formatted) { ... carregaDadosNivel2(); ... } $("#nivel01").unautocomplete().autocomplete(niveis01, { minChars: 0, width: 400, matchContains: true, highlightItem: true, formatItem: formatItem, formatResult: formatResult }).result(findValueCallback1).next().click(function() { $(this).prev().search(); }); } function carregaDadosNivel2() { $.ajax({ url: "http://.....", cache: true, type: "POST", dataType:"json", success: function(data){ ... niveis02 = data; habilitaComboNivel2(); ... }, error: function(xhr, ajaxOptions, thrownError){ ... } }); } function habilitaComboNivel2() { function findValueCallback2(event, data02, formatted) { ... carregaDadosNivel3(); ... } $("#nivel02").unautocomplete().autocomplete(niveis02, { minChars: 0, width: 400, matchContains: true, highlightItem: true, formatItem: formatItem, formatResult: formatResult }).result(findValueCallback2).next().click(function() { $(this).prev().search(); }); } function carregaDadosNivel3() { $.ajax({ url: ""http://.....", cache: true, type: "POST", dataType:"json", success: function(data){ ... niveis03 = data; habilitaComboNivel3(); ... }, error: function(xhr, ajaxOptions, thrownError){ ... } }); } function habilitaComboNivel3() { function findValueCallback3(event, data03, formatted) { ... } $("#nivel03").unautocomplete().autocomplete(niveis03, { minChars: 0, width: 400, matchContains: true, highlightItem: true, formatItem: formatItem, formatResult: formatResult }).result(findValueCallback3).next().click(function() { $(this).prev().search(); }); }

    Read the article

  • Searchfield with autocomplete ASP.NET and Database

    - by Fogh
    Searchfield with autocomplete I would like to make a searchfield with autocomplete, so when you write like 2 or 3 letters it will show a dropdownlist with results that match a column from a table in the database. I have been reading all over the internet, and i have found out that it can be done with jQuery and AJAX Control Toolkit. But i don't know how to make it compare the search textbox and the database and show results that match?

    Read the article

  • Is it possible to set the width of a jquery autocomplete combobox

    - by oo
    i am using this jquery ui combobox autocomplete control out of the box off the jquery ui website: my issue is that i have multiple comboboxes on a page and i want them to have different widths for each one. i can change the width for ALL of them by adding this css: .ui-autocomplete-input { width:300px; } but i can't figure out a way to change the width on just one of them

    Read the article

  • Good Jquery Autocomplete plugin consuming JSON ...

    - by chandru_cp
    I have my customers name in json format i have to use it in a textbox such that it auto completes to give list of users ... Any good Jquery Autocomplete plugin consuming JSON.. I have gone through a similar question of stackoverflow but it didnt help me http://stackoverflow.com/questions/188442/whats-a-good-ajax-autocomplete-plugin-for-jquery

    Read the article

  • Autocomplete functionality on a textarea

    - by sslepian
    Is there a way to implement auto-complete functionality in a region defined by textarea tags or something similar? I'm currently using a jquery autocomplete plugin to suggest input to the user inside input tags, but the issue is that the autocomplete phrases can often be fairly long and thus scroll off the edge of the input field.

    Read the article

  • JQuery AutoComplete with JEditable

    - by bkak
    Hi, I am trying to attach AutoComplete of JQuery with JEditable. Got the following eg on search. But it also does not seem to work. http://www.pastie.org/978610 I want to attach AutoComplete to <td> of DataTable(Allan Jardine). Does anybody have any code snippet for the same? Pl help.. Thanks, Bhoomi.

    Read the article

  • jQuery UI Autocomplete IE Cursor Position Bug

    - by CountZero
    Heya, I have just implemented the excellent jQuery UI autocomplete. http://jqueryui.com/demos/autocomplete/ There is a strange bug in IE 8 (and maybe other versions). When you select an item from the box of suggestions in IE 8 the cursor moves to the begining of the textbox before the suggested word which has just been inserted. Firefox put the cursor after the inserted word. Does anyone know of a fix for this? Regards Steve

    Read the article

  • What is the "standard" JQuery treeview that most people use? It seems the most popular plugin isn't

    - by Pete Alvin
    I've chosen JQuery as my JavaScript library but now I'm a bit frustrated by the JQuery plugin site... the site kinda sucks... the plugin area isn't designed very well and I can only find a few treeviews. The one with the most votes (link text) isn't supported anymore. Can someone please point me to an industrial strength treeview? Desired Features: 1. stable 2. async / ajax would be nice 3. drag and drop nodes would be nice I've been delighted so far with JQueryUI--nice design. But, how come it doesn't come with a standard tree view? Pete

    Read the article

  • Jquery Accordion and Fading

    - by Slick Willis
    I am trying to create a jquery accordion that fades the header of the accordion out when the page is loaded then fades it in when the mouse hovers. The accordion also opens when the mouse hovers. I am able to get all of this working, the problem I am having is when the accordion opens the header moves away and the mouse is no longer on it to keep it lit. I would like the links to keep the header lit as well as if the mouse is on the header itself. Below is the code that I wrote for it. <html> <head <script type='text/javascript' src='http://accidentalwords.squarespace.com/storage/jquery/jquery-1.4.2.min.js'></script> <script type='text/javascript' src='http://accidentalwords.squarespace.com/storage/jquery/jquery-custom-181/jquery-ui-1.8.1.custom.min.js'></script> </head> <body bgcolor="black"> <style = "css/text"> .links { font-family: "Georgia", "Verdana", serif; line-height: 30px; margin-left: 20px; margin-top: 5px; } .Title { font-family: "Geneva", "Verdana", serif; font-weight: bold; font-size: 2em; text-align: left; font-variant: small-caps; border-bottom: solid 2px #25FF00; padding-bottom:5px; margin-bottom: 10px; } </style> <script type="text/javascript"> $(document).ready(function(){ $(".Title").fadeTo(1,0.25); $(".Title").hover(function () { $(this).stop().fadeTo(250,1) .closest(".Title").find(".links").fadeTo(250,0.75); }, function() { $(this).stop().fadeTo(250,0.25); }); }); $(function() { $("#accordion").accordion({ event: "mouseover" }); }); </script> <p>&nbsp</p> <div id="accordion"> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #25FF00;">Reference</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #25FF00;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #25FF00;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #25FF00;">w3schools.com</a><br> </div> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #FF7200;">Gaming</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #FF7200;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #FF7200;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #FF7200;">w3schools.com</a><br></div> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">Grub</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #00DEFF;">w3schools.com</a><br> </div> <div class="Title"><a href="#"STYLE="TEXT-DECORATION: NONE; color: #F8FF00;">Drinks</a></div> <div class="links"> <a href="http://docs.jquery.com/Main_Page" STYLE="TEXT-DECORATION: NONE; color: #F9FF00;">Jquery Documentation/Help</a><br> <a href="http://stackoverflow.com/" STYLE="TEXT-DECORATION: NONE; color: #F8FF00;">Stack Overflow</a><br> <a href="http://www.w3schools.com/" STYLE="TEXT-DECORATION: NONE; color: #F8FF00;">w3schools.com</a><br> </div> </div> </body> </html>

    Read the article

  • Autocomplete and IE7 - slowness, sluggishness as overall pagesize grows?

    - by wchrisjohnson
    Hi, I have the autocomplete plugin (http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/, version 1.1 and 1.0.2) on a project to add pieces of "equipment" to a "project". On a fresh project the plugin works great; the data returned from the database comes back FAST, you can scroll the list fast, and can select an item and move on to the next one. Once I have a project established with equipment on it, and I go to add equipment, the performance is pretty bad. It takes 4-5 seconds to get the list of data back from the server, scrolling the list is painful, and the cursor takes several seconds to settle on an item. Repainting the page after the list goes away is slow. This is occurring in IE7, latest version. FF3 and Chrome are fine, very snappy. The pagesize is about 40K overall. I'm thinking this is an issue with the IE7 Javascript engine, or an edge case with this plugin and IE7; it works quickly enough in FF3+. I would appreciate any ideas, solutions, known issues, or thoughts on how to more specifically pin this down. I'd love to post sample code, but this is a corporate app, and I'm not how useful it would be given that the server side piece cannot be shown; ie: you can't pull it down and test it like a self contained piece of code.. Thanks in advance! Chris

    Read the article

  • jquery autocomplete & masterpage

    - by Caroline
    Hi everyone, first time posting here, so hello to all :-) I'm pretty new to the jQuery thing, but I got the autocomplete function running quite well on a simple aspx page. Now I wanted to use the same function on an aspx-page with a masterpage, and it doesnt work anymore. this test function works fine: $(document).ready(function () { $("[id$=AlertButton]").click(function () { alert("Welcome jQuery !"); }); }); but this simply does nothing: $(document).ready(function () { $("[id$=Suchen]").autocomplete("AutocompleteData.ashx"); }); the javascript and css files are loaded in the master page, just above the contentplaceholder. the code within the contentplaceholder looks like this: <atlas:ScriptManager id="SM1" runat="server" EnablePartialRendering="true" > <Services> <atlas:servicereference path="~/xxxxx.asmx" /> </Services> </atlas:ScriptManager> <script type="text/javascript"> $(document).ready(function () { $("[id$=Suchen]").autocomplete("AutocompleteData.ashx"); }); </script> <br /> <asp:Button ID="AlertButton" runat="server" Text="Button" /> <br /> <asp:TextBox ID="Suchen" Width="250" runat="server"></asp:TextBox> if I execute the .ashx page on its own, it fires back the expected data... I've been browsing tons of pages, but couldn't resolve the issue. I'd be glad for any input!!! Thanks alot & all the best, Caroline

    Read the article

  • Jquery AutoComplete Plugin calling

    - by martinezgeovani
    When I use JQuery's autocomplete and hardcode the array values in the page it works wonderful; but what I need to do is obtain the array values from either a web service or from a public function inside a controller. I have tried various way and can't seem to make it work. The farthest I got is pulling the data in to a long string and when the auto complete results are provided it's the long string which matches, which I understand why. $("#TaskEmailNotificationList").autocomplete("http://localhost/BetterTaskList/Accounts/registeredUsersEmailList", { multiple: true, mustMatch: false, multipleSeparator: ";", autoFill: true }); has anyone encountered this? I am using C#. UPDATE: The below code is a step forward I am now getting an array returned but I think I'm processing it wrong on my page. var emailList = "http://localhost/BetterTaskList/Account/RegisteredUsersEmailList"; $("#TaskEmailNotificationList").autocomplete(emailList, { multiple: true, mustMatch: false, multipleSeparator: ";", autoFill: true }); [HttpGet] public ActionResult RegisteredUsersEmailList() { BetterTaskListDataContext db = new BetterTaskListDataContext(); var emailList = from u in db.Users select u.LoweredUserName; return Json(emailList.ToList(), JsonRequestBehavior.AllowGet); }

    Read the article

  • jQuery: Can't get tooltip plugin to work

    - by Rosarch
    I'm trying to use this tooltip plugin: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/. I can't seem to get it to work. <head> <script type="text/javascript" src="/static/JQuery.js"></script> <script type="text/javascript" src="/static/jquery-ui-1.8.1.custom.min.js"></script> <script type="text/javascript" src="/static/jquery.json-2.2.min.js"></script> <script type="text/javascript" src="/static/jquery.form.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.bgiframe.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.delegate.js"></script> <script type="text/javascript" src="/static/js-lib/jquery.dimensions.js"></script> <script type="text/javascript" src="/static/jquery.tooltip.js"></script> <script type="text/javascript" src="/static/sprintf.js"></script> <script type="text/javascript" src="/static/clientside.js"></script> </head> I try it out in a simple example: clientside.js: $(document).ready(function () { $("#set1 *").tooltip(); }); The target html: <div id="set1"> <p id="welcome">Welcome. What is your email?</p> <form id="form-username-form" action="api/user_of_email" method="get"> <p> <label for="form-username">Email:</label> <input type="text" name="email" id="form-username" /> <input type="submit" value="Submit" id="form-submit" /> </p> </form> <p id="msg-user-accepted"></p> </div> Unfortunately, nothing happens. What am I doing wrong?

    Read the article

  • jquery-ui autocomplete with ASP MVC suggestions not displaying

    - by adamnickerson
    I have been trying to get a simple example of the jquery-ui autocomplete to work. I have a controller setup to handle the query, and it returns the json that looks to be in order, but I am getting no suggestions showing up. Here are the js libraries I am including: <script type="text/javascript" language="javascript" src="/Scripts/jquery-1.4.1.js"></script> <script type="text/javascript" language="javascript" src="/Scripts/jquery-ui-1.8.1.custom.min.js"></script> <link href="/Content/jquery-ui-1.8.1.custom.css" rel="stylesheet" type="text/css" /> and here is the javascript and the form tags: <script type="text/javascript"> $(function () { $("#organization").autocomplete({ source: function (request, response) { $.ajax({ url: '/Organization/OrganizationLookup', dataType: "json", data: { limit: 12, q: request.term } }) }, minLength: 2 }); }); </script> <div class="ui-widget"> <label for="organization">Organization: </label> <input id="organization" /> </div> I get back a json response that looks reasonable from my controller: [{"id":"Sector A","value":"Sector A"},{"id":"Sector B","value":"Sector B"},{"id":"Sector C","value":"Sector C"}] id and value seem to be the default naming that autocomplete is looking for. But I get no joy at all. Any thoughts?

    Read the article

  • ZendX jQuery Autocomplete not working in framework

    - by Jan-Dean Fajardo
    I added the ZendX library. Added the helper in controller: public function init() { $this->view->addHelperPath( 'ZendX/JQuery/View/Helper' ,'ZendX_JQuery_View_Helper'); } Created a form for view page: public function indexAction() { // Filter form $this->view->autocompleteElement = new ZendX_JQuery_Form_Element_AutoComplete('txtLocation'); $this->view->autocompleteElement->setAttrib('placeholder', 'Search Location'); $this->view->autocompleteElement->setJQueryParam('data', array('Manila', 'Pasay', 'Mandaluyong', 'Pasig', 'Marikina','Makati')); } Load jQuery and form in view page. <?php echo $this->jQuery(); ?> <form> <?php echo $this->autocompleteElement; ?> </form> The form is visible in the view page. But the autocomplete isn't working. I even don't see any jQuery script in the source page. Have I missed something?

    Read the article

  • Autocomplete and User define keyboard

    - by Geetha
    Hi All, I am using asp:button to create a keyboard with A-Z and 0-9 for touch screen using Java script. This keyboard is linked with one textbox. If we click one button corresponding text will be displayed on the textbox. Its working fine. I have included the autocomplete feature to this textbox using jquery JQuery Autocomplete. Problem: The autocomplete is not working if i my user define keyboard. How to modify my key buttons as keyboard keys? Is it possible? Is there any other way to achieve this? Code: <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox> <asp:Button ID="zero" runat="server" Text="0" CssClass="myclass" OnClientClick="return typeLetter(this);" TabIndex="20"/> function typeLetter(currentbutton) { if (previousActiveElement != null) { if (previousActiveElement == 'antSearchText'){ var position = document.getElementById('position').value; if (position == '') { alert('chk position'); } else { var existingString = document.getElementById(previousActiveElement).value; var beforeString = existingString.substring(0, position); var afterString = existingString.substring(position, existingString.length); document.getElementById(previousActiveElement).value = beforeString + currentbutton.value + afterString; setCaretPosition(document.getElementById(previousActiveElement), parseInt(position) + 1); setCaretPosition(document.getElementById(previousActiveElement), parseInt(position) + 1); } } } return false; }

    Read the article

  • Using jQuery Live instead of jQuery Hover function

    - by hajan
    Let’s say we have a case where we need to create mouseover / mouseout functionality for a list which will be dynamically filled with data on client-side. We can use jQuery hover function, which handles the mouseover and mouseout events with two functions. See the following example: <!DOCTYPE html> <html lang="en"> <head id="Head1" runat="server">     <title>jQuery Mouseover / Mouseout Demo</title>     <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.js"></script>     <style type="text/css">         .hover { color:Red; cursor:pointer;}     </style>     <script type="text/javascript">         $(function () {             $("li").hover(               function () {                   $(this).addClass("hover");               },               function () {                   $(this).removeClass("hover");               });         });     </script> </head> <body>     <form id="form2" runat="server">     <ul>         <li>Data 1</li>         <li>Data 2</li>         <li>Data 3</li>         <li>Data 4</li>         <li>Data 5</li>         <li>Data 6</li>     </ul>     </form> </body> </html> Now, if you have situation where you want to add new data dynamically... Lets say you have a button to add new item in the list. Add the following code right bellow the </ul> tag <input type="text" id="txtItem" /> <input type="button" id="addNewItem" value="Add New Item" /> And add the following button click functionality: //button add new item functionality $("#addNewItem").click(function (event) {     event.preventDefault();     $("<li>" + $("#txtItem").val() + "</li>").appendTo("ul"); }); The mouse over effect won't work for the newly added items. Therefore, we need to use live or delegate function. These both do the same job. The main difference is that for some cases delegate is considered a bit faster, and can be used in chaining. In our case, we can use both. I will use live function. $("li").live("mouseover mouseout",   function (event) {       if (event.type == "mouseover") $(this).addClass("hover");       else $(this).removeClass("hover");   }); The complete code is: <!DOCTYPE html> <html lang="en"> <head id="Head1" runat="server">     <title>jQuery Mouseover / Mouseout Demo</title>     <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.js"></script>     <style type="text/css">         .hover { color:Red; cursor:pointer;}     </style>     <script type="text/javascript">         $(function () {             $("li").live("mouseover mouseout",               function (event) {                   if (event.type == "mouseover") $(this).addClass("hover");                   else $(this).removeClass("hover");               });             //button add new item functionality             $("#addNewItem").click(function (event) {                 event.preventDefault();                 $("<li>" + $("#txtItem").val() + "</li>").appendTo("ul");             });         });     </script> </head> <body>     <form id="form2" runat="server">     <ul>         <li>Data 1</li>         <li>Data 2</li>         <li>Data 3</li>         <li>Data 4</li>         <li>Data 5</li>         <li>Data 6</li>     </ul>          <input type="text" id="txtItem" />     <input type="button" id="addNewItem" value="Add New Item" />     </form> </body> </html> So, basically when replacing hover with live, you see we use the mouseover and mouseout names for both events. Check the working demo which is available HERE. Hope this was useful blog for you. Hope it’s helpful. HajanReference blog: http://codeasp.net/blogs/hajan/microsoft-net/1260/using-jquery-live-instead-of-jquery-hover-function

    Read the article

  • useFastClick in JQuery Mobile

    - by Yousef_Jadallah
      Normal 0 false false false EN-US X-NONE AR-SA /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial; mso-bidi-theme-font:minor-bidi;} For who want to convert the application from JQM Alpha to JQM Beta 1, needs to bind  click  events to the new vclick one. Click event is working in general browsers butt that is needed for iOS and Android, useFastClick  is (touch + mouse click). Moreover if you have this event alot in your project you can turn useFastClick off in mobileinit event: $(document).bind("mobileinit", function () {             $.mobile.useFastClick = false; });   vclick event is needed to support touch events to make the page changes to happen faster, and to perform the URL hiding. So you need to change something like this  $('btnShow').live("click", function (evt) {   To :  $('btnShow').live("vclick", function (evt) {     For more information : http://jquerymobile.com/test/docs/api/globalconfig.html   Here you can find full example in this case : <!DOCTYPE ><html xmlns="http://www.w3.org/1999/xhtml"><head>    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css" />    <script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>    <script src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>    <script type="text/javascript">     //Here you need to use vclick instead of click event         $('ul[id="MylistView"] a').live("vclick", function (evt) {            alert('list click');        });      </script>    <title></title></head><body>    <div id="FirstPage" data-role="page" data-theme="b">        <div data-role="header">            <h1>                Page Title</h1>        </div>        <div data-role="content">            <ul id="MylistView" data-role="listview" data-theme="g">                <li><a href="#SecondPage">Acura</a></li>                <li><a href="#SecondPage">Audi</a></li>                <li><a href="#SecondPage">BMW</a></li>            </ul>        </div>        <div data-role="footer">            <h4>                Page Footer</h4>        </div>    </div>    <div id="SecondPage" data-role="page" data-theme="b"   >        <div data-role="header" >            <h1>                Page Title</h1>        </div>        Second Page        <div data-role="footer">            <h4>                Page Footer</h4>        </div>    </div></body></html>     Hope that helps.

    Read the article

  • Rebind dymanically created forms after jQuery ajax response

    - by Pjack
    I'm kinda new to jQuery but understand it for the most part. My problem is that when my ajax call which refreshes the entire div is done, all my dynamically created forms don't work. If you try and submit them, the event doens't work properly and just tries to do a normal form submit. I have all the other items such as links bound using the .live() which seem to work great. Just the form dies. How do I rebind the dynamically created forms after the ajax call? They all have id of formname_id. I tried to use bind but it doesn't work as below. Any help is appreciated. Here is the code jQuery(document).ready(function(){ jQuery("form[id^='commentform_']").each(function(){ var id = parseInt(this.id.replace("commentform_", "")); jQuery(this).bind('submit', function(e) { var action = jQuery('#action_' + id).attr('value'); var act_id = ('1'); jQuery.ajax({ type: "POST", url: "ajax/modify.php", data: "action="+ action +"& act_id="+ act_id, success: function(response){ jQuery('#CommentsContainer_' + id).html(response); jQuery('#commentform_' + id)[0].reset(); } }); return false; }); }); });

    Read the article

  • Autocomplete jQuery on User Controller within Repeater .NET

    - by TheDPQ
    I have a Multiview search feature on a Web User Controller that is called within a Repeater, OHMY!! I have some training sessions being listed out on a page, each calling an employeeSearch Web User Controller so people can search for employees to add to the training session. I have the Employee Names and Employee IDs listed out in JS on the page and using the jQuery autocomplete i have them search for the employee and populate a hidden field in the User controller. Once the process is done they have the option of adding yet another employee. So i had Autocompelte 'work' in all the employee search boxes, but one i do the initial search (postback) autocomplete won't work again. Then i updated $().ready(function() to pageLoad() so it works correctly on multiple searches but only in the LAST item of the repeater (jQuery is loaded on the User Controller) FYI: I have the JS string set as EMPLOYEENAME|ID and jQuery displays the Employee Name and if they select it throws the ID in a ASP:HIDDEN FIELD <script type="text/javascript"> format_item = function(item, position, length) { var str = item.toString().split("|", 2); return str[0]; } function pageLoad() { $("#<%=tb_EmployeeName.ClientID %>").autocomplete(EmployeeList, { minChars: 0, width: 500, matchContains: true, autoFill: false, scrollHeight: 300, scroll: true, formatItem: format_item, formatMatch: format_item, formatResult: format_item }); $("#<%=tb_EmployeeName.ClientID %>").result(function(event, data, formatted) { var str = data.toString().split("|", 2); $("#<%=hf_EmployeeID.ClientID %>").val(str[1]); }); }; </script> I can already guess that by repeating pageLoad within the User Controll i override the previous pageLoad. THE QUESTION: Is there a way around this, a way to have all the jQuery appear in a single pageLoad or to somehow have a single jquery call to handle all my search boxes? I can't move the jQuery into the page calling all the controllers because i have no way of referencing the specific *tb_EmployeeName* textbox AND *hf_EmployeeID* hidden field. Thank you so much for any help or insight you can give me into this problem. This is the Multiview that on the User Controller <asp:MultiView ID="mv_EmployeeArea" runat="server" ActiveViewIndex="0"> <asp:View ID="vw_Search" runat="server"> <asp:Panel ID="eSearch" runat="server"> <b>Signup Employee Search</b> (<i>Last Name, First Name</i>)<br /> <asp:TextBox ID="tb_EmployeeName" class="EmployeeSearch" runat="server"></asp:TextBox> <asp:HiddenField ID="hf_EmployeeID" runat="server" /> <asp:Button ID="btn_Search" runat="server" Text="Search" /> </asp:Panel> </asp:View> <asp:View ID="vw_Confirm" runat="server"> <b>Signup Confirmation</b> <asp:FormView ID="fv_EmployeeInfo" runat="server"> <ItemTemplate> <%#(Eval("LastName"))%>, <%#(Eval("FirstName"))%><br /> </ItemTemplate> </asp:FormView> <asp:Button ID="btn_Confirm" runat="server" Text="Signup this employee" /> &nbsp; <asp:Button ID="btn_Reset3" runat="server" Text="Reset" /> </asp:View> <asp:View ID="vw_ThankYou" runat="server"> <b>Thank You</b><br /> The employee has been signed up and an email confirmation has been sent out.<br /><br /> <asp:Button ID="btn_Reset" runat="server" Text="Reset" /> </asp:View> </asp:MultiView> UPDATE: I never did find an answer but i had to do a demo so i hacked together something that 'works', but feels sort of cheesy. I am still very much needed of a better question or better understanding.

    Read the article

  • jQuery "Autocomplete" plugin is messing up the order of my data

    - by Max Williams
    I'm using Jorn Zaefferer's Autocomplete plugin on a couple of different pages. In both instances, the order of displayed strings is a little bit messed up. Example 1: array of strings: basically they are in alphabetical order except for General Knowledge which has been pushed to the top: General Knowledge,Art and Design,Business Studies,Citizenship,Design and Technology,English,Geography,History,ICT,Mathematics,MFL French,MFL German,MFL Spanish,Music,Physical Education,PSHE,Religious Education,Science,Something Else Displayed strings: General Knowledge,Geography,Art and Design,Business Studies,Citizenship,Design and Technology,English,History,ICT,Mathematics,MFL French,MFL German,MFL Spanish,Music,Physical Education,PSHE,Religious Education,Science,Something Else Note that Geography has been pushed to be the second item, after General Knowledge. The rest are all fine. Example 2: array of strings: as above but with Cross-curricular instead of General Knowledge. Cross-curricular,Art and Design,Business Studies,Citizenship,Design and Technology,English,Geography,History,ICT,Mathematics,MFL French,MFL German,MFL Spanish,Music,Physical Education,PSHE,Religious Education,Science,Something Else Displayed strings: Cross-curricular,Citizenship,Art and Design,Business Studies,Design and Technology,English,Geography,History,ICT,Mathematics,MFL French,MFL German,MFL Spanish,Music,Physical Education,PSHE,Religious Education,Science,Something Else Here, Citizenship has been pushed to the number 2 position. I've experimented a little, and it seems like there's a bug saying "put things that start with the same letter as the first item after the first item and leave the rest alone". Kind of mystifying. I've tried a bit of debugging by triggering alerts inside the autocomplete plugin code but everywhere i can see, it's using the correct order. it seems to be just when its rendered out that it goes wrong. Any ideas anyone? max EDIT - reply to Clint Thanks for pointing me at the relevant bit of code btw. To make diagnosis simpler i changed the array of values to ["carrot", "apple", "cherry"], which autocomplete re-orders to ["carrot", "cherry", "apple"]. Here's the array that it generates for stMatchSets: stMatchSets = ({'':[#1={value:"carrot", data:["carrot"], result:"carrot"}, #3={value:"apple", data:["apple"], result:"apple"}, #2={value:"cherry", data:["cherry"], result:"cherry"}], c:[#1#, #2#], a:[#3#]}) So, it's collecting the first letters together into a map, which makes sense as a first-pass matching strategy. What i'd like it to do though, is to use the given array of values, rather than the map, when it comes to populating the displayed list. I can't quite get my head around what's going on with the cache inside the guts of the code (i'm not very experienced with javascript).

    Read the article

  • JQuery Autocomplete only suggesting first row

    - by Chris McCall
    I'm doing research using JQuery's Autocomplete plugin and Google Maps' API. What I have so far is located here. I'm using Asp.net MVC to generate the list of potential address matches (limited to US addresses only) and presenting them as a pipe-delimeted list to Autocomplete, which is supposed to be .spliting them up and suggesting them to the user. The problem I'm having (besides a stubborn IE-only javascript error, which I'll break into another question), is that only the first result is suggested. This page clearly shows two results, yet typing "3118" into the textbox produces only the Galax Dr result. How can I get Automplete to produce both results?

    Read the article

  • use jquery autocomplete with carousel for preview and selection

    - by dave
    Hi, I've successfully used jquery autocomplete to display a list of matching images based on user input. The user experience isn't great though due to the number of potential matches - even with fairly prescriptive input. I've found this example at nokia http://www.nokia.co.uk/support/download-software/device-software-update (I know it's written in flash) which would provide the ideal interface for what I'm trying to achieve. Does anyone have any pointers for doing this using jquery autocomplete as a starting point? Or better still know of an existing javascript library that provides this functionality? I'm using the latest release of jquery if that matters. Thanks, Dave.

    Read the article

  • jQuery li:has(ul) selector issue

    - by sushil bharwani
    I was creating a tree using UL LI list and jQuery. I used a jQuery Selector jQuery(li:has(ul)) to find all the list nodes having childs and then added a click event to it. jQuery(li:has(ul)).click(function(event) { jQuery(this).children.toggle(); jQuery(this).css("cursor","hand"); }); This works for me except i dont understand why i get a cursor hand and click event triggering even when i take mouse pointer to childs of my selected li <li> Parent // it works here that is fine <ul> <li> child1 // it works here i dont understand need explanation </li> <li> child2 // it works here i dont understand need explanation </li> </ul> </li>

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >