Web Analytics Made Easy -
StatCounter jQuery textbox change event - CodingForum

Announcement

Collapse
No announcement yet.

jQuery textbox change event

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jQuery textbox change event

    Hi

    I have been struggling with this since morning today. So I hope someone can help me with my problem.

    I am using jQuery autocomplete plugin for one of my site.

    What exactly I am looking for is either of the following:

    1) When someone selects one of the data from the auto-complete list, (either by selecting it with their mouse or by pressing the enter key), the plugin should fire a callback event with the value of the text entered.

    OR

    2) By using the change event of jquery to monitor whenever a data has been selected from the list. I am trying to achieve this by using the following code:

    Code:
    	$('#search').change(function() {
    		
    		console.log('Hello World');
    	
    	});
    But apparently the above code is only triggering the event whenever the user presses any key and NOT when a data from the list is selected.

    I am attaching the relevant code. So if you could please help me with this.


    Many Thanks in advance.
    Attached Files

  • #2
    I suggest you use the jQuery UI autocomplete widget, which provides a number of built in events including selection of an autocomplete option.
    Use the W3C HTML Validator and CSS Validator to check your code and Firebug to see what css is applied to an element
    Read Steve Krug's book Don't Make Me Think - essential reading on web usability
    I don't recommend much, but I do recommend Clook for UK web hosting

    Comment


    • #3
      HI

      Thanks so much for replying. Can you please let me know if they support IMAGE + Text as list items?

      I mean, I am looking something like the oanda currency converter type autocomplete.

      Please let me know.

      Thanks

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎