{"action":"created","issue":{"url":"https://api.github.com/repos/LeaVerou/awesomplete/issues/16797","labels_url":"https://api.github.com/repos/LeaVerou/awesomplete/issues/16797/labels{/name}","comments_url":"https://api.github.com/repos/LeaVerou/awesomplete/issues/16797/comments","events_url":"https://api.github.com/repos/LeaVerou/awesomplete/issues/16797/events","html_url":"https://github.com/LeaVerou/awesomplete/issues/16797","id":121296264,"number":16797,"title":"Submit form when user click on a suggestion","user":{"login":"anarchoi","id":2366002,"avatar_url":"https://avatars.githubusercontent.com/u/2366002?v=3","gravatar_id":"","url":"https://api.github.com/users/anarchoi","html_url":"https://github.com/anarchoi","followers_url":"https://api.github.com/users/anarchoi/followers","following_url":"https://api.github.com/users/anarchoi/following{/other_user}","gists_url":"https://api.github.com/users/anarchoi/gists{/gist_id}","starred_url":"https://api.github.com/users/anarchoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarchoi/subscriptions","organizations_url":"https://api.github.com/users/anarchoi/orgs","repos_url":"https://api.github.com/users/anarchoi/repos","events_url":"https://api.github.com/users/anarchoi/events{/privacy}","received_events_url":"https://api.github.com/users/anarchoi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T17:20:14Z","updated_at":"2015-12-10T20:11:42Z","closed_at":null,"body":"How can i do this?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/LeaVerou/awesomplete/issues/comments/163736780","html_url":"https://github.com/LeaVerou/awesomplete/issues/16797#issuecomment-163736780","issue_url":"https://api.github.com/repos/LeaVerou/awesomplete/issues/16797","id":163736780,"user":{"login":"anarchoi","id":2366002,"avatar_url":"https://avatars.githubusercontent.com/u/2366002?v=3","gravatar_id":"","url":"https://api.github.com/users/anarchoi","html_url":"https://github.com/anarchoi","followers_url":"https://api.github.com/users/anarchoi/followers","following_url":"https://api.github.com/users/anarchoi/following{/other_user}","gists_url":"https://api.github.com/users/anarchoi/gists{/gist_id}","starred_url":"https://api.github.com/users/anarchoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anarchoi/subscriptions","organizations_url":"https://api.github.com/users/anarchoi/orgs","repos_url":"https://api.github.com/users/anarchoi/repos","events_url":"https://api.github.com/users/anarchoi/events{/privacy}","received_events_url":"https://api.github.com/users/anarchoi/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T20:11:42Z","updated_at":"2015-12-10T20:11:42Z","body":"I tried it but it doesn't work, what did i do wrong ?\n\n<form id=\\\"search_form\\\" method=\\\"GET\\\" action=\\\"$http://www.$domain/\\\">\n<input type=\\\"search\\\" id=\\\"search\\\" name=\\\"search\\\" class=\\\"awesomplete\\\">\n</form>\n\ninpulElement.addEventListenr('awesomplete-selectcomplete', function(e){\n  $(\\\"#search_form\\\").ajaxSubmit({url: '$http://www.$domain/', type: 'get'})\n});\n\n2015-12-09 15:50 GMT-05:00 Jonathan Pollak <notifications@github.com>:\n\n> @anarchoi <https://github.com/anarchoi> -\n> When an item is clicked, two events are fired - awsesomplete-select (on\n> click before text in the input is replaced), and\n> awesomplete-selectcomplete (after the selection has been applied).\n>\n> you can do:\n>\n> inpulElement.addEventListenr('awesomplete-selectcomplete', function(e){\n>   // Submit form\n> });\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/LeaVerou/awesomplete/issues/16797#issuecomment-163388010>\n> .\n>\n"}}