Fórumok
autocomplete onclick not working
dave ch, módosítva 11 év-val korábban
autocomplete onclick not working
Regular Member Bejegyzések: 161 Csatlakozás dátuma: 2012.02.07. Legújabb bejegyzések
Hi all,
I am using two hyperlinks: edit and comment.
When i am clicking on comment first then it is going inside <c:when> and then inside autocomplete.on('click',function(event) { }.
But when i am clicking on edit first and then clicking on comment it is not going inside autocomplete.on('click',function(event) { }.
i am getting the value of autocomplete every time in my alert .
Below is my code:
What would be the possible reason that restricts to go inside this autocomplete.on('click', function) when i am clicking on edit first and then comment, regardless of i am getting the value of autocomplete every time correct?
Any help would be appreciated.
Regards,
Dave
I am using two hyperlinks: edit and comment.
When i am clicking on comment first then it is going inside <c:when> and then inside autocomplete.on('click',function(event) { }.
But when i am clicking on edit first and then clicking on comment it is not going inside autocomplete.on('click',function(event) { }.
i am getting the value of autocomplete every time in my alert .
Below is my code:
<c:choose>
<c:when test="<%= !edit %>">
var autocomplete = A.one('#<portlet:namespace />autocomplete<%= microblogsEntryId %>');
alert("autocomplete"+autocomplete);
autocomplete.on(
'click',
function(event) {
var contentInput = A.one('#<portlet:namespace />contentInput<%= microblogsEntryId %>');
var highlighterContent = A.one('#<portlet:namespace />highlighterContent<%= microblogsEntryId %>');
if (!contentInput) {
highlighterContent.removeClass('textbox');
createTextarea('#<portlet:namespace />autocompleteContent');
}
}
);
</c:when>
<c:otherwise>
createTextarea('#<portlet:namespace />autocompleteContent');
</c:otherwise>
</c:choose>
What would be the possible reason that restricts to go inside this autocomplete.on('click', function) when i am clicking on edit first and then comment, regardless of i am getting the value of autocomplete every time correct?
Any help would be appreciated.
Regards,
Dave