SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trouble with devbridge autocomplete plugin

    I am using the autocomplete plugin from devbridge (plugin page).

    On the page where I am using it, I am actually inserting textboxes into a div via ajax after the page is loaded, so in order to apply the autocomplete plugin to those textboxes I am using the jQuery .on function like this...

    Code:
    $('body').on('change', '#rightColumn', function(){
    			$('.jobCode').autocomplete({
    			serviceUrl: 'jobCodeSearch_AJAX.cfm',
    			minChars: 2,
    			onSelect: function(suggestion) {
    				alert('chosen: ' + suggestion.data);
    				$(this).val(suggestion.data);
    			}
    		});
    	});
    and I am manually triggerign the change event on #rightColumn when I insert the textboxes.

    So with that said - this is only half working.

    When i try typing in the inserted textbox, the results are coming up in the autocomplete as they should, but if I click on one of the result, it is not populating the textbox.

    If I use my arrow keys to scroll down to one of the selections in the autocomplete and use the tab key to select it - it works every time, but clicking doesnt seem to work.

    I am really not sure what I am doign wrong here - can anyone help??

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,312
    Mentioned
    177 Post(s)
    Tagged
    8 Thread(s)
    Hi,

    It's hard to say what's not working based on the coed you posted.
    Could you share the link to your site, so that we can get a better picture of what is going on?

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply. Unfortunately it is not available outside my company's network so I cant post a link but let me know what other code I can post to give you a more complete picture.

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,312
    Mentioned
    177 Post(s)
    Tagged
    8 Thread(s)
    Oh ok, in that case could you make a stripped down version of your page that illustrates the problem you're having and post that.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •