Fórumok
Autocomplete Street 1 on users_admin/addresses.jsp
Sarah L Farley, módosítva 11 év-val korábban
Autocomplete Street 1 on users_admin/addresses.jsp
Junior Member Bejegyzések: 37 Csatlakozás dátuma: 2009.05.06. Legújabb bejegyzések
Hi,
I am writing a hook for the portlet users_admin which will allow the user to start typing a building name and the field will autocomplete.
I would like to assign this field to the autocomplete field
I have the following javascript code:
Howerever, it seems to only display the field if I have the div tag in place
Even then, when I submit the form, it says Street 1 is invalid.
Any suggestions?
I am writing a hook for the portlet users_admin which will allow the user to start typing a building name and the field will autocomplete.
I would like to assign this field to the autocomplete field
<aui:input fieldParam="<%= "addressStreet1_" + addressesIndex %>" id="<%= "addressStreet1_" + addressesIndex %>" name="street1" />
I have the following javascript code:
AUI().ready('aui-autocomplete', function(A) {
var building = [ <!-- insert my building list -->];
var autoComplete = new A.AutoComplete( { contentBox: '#<portlet:namespace />addressStreet1_0', dataSource: building, matchKey: 'name', typeAhead: true, schema: { resultFields: ['key', 'name', 'description'] } } ) .render(); });
//-->
Howerever, it seems to only display the field if I have the div tag in place
" >
Even then, when I submit the form, it says Street 1 is invalid.
Any suggestions?
Sarah L Farley, módosítva 11 év-val korábban
RE: Autocomplete Street 1 on users_admin/addresses.jsp
Junior Member Bejegyzések: 37 Csatlakozás dátuma: 2009.05.06. Legújabb bejegyzések
My full code for the div tag is this:
<div id="<portlet:namespace /><%= " addressstreet1_" + addressesindex %>" >
<aui:input fieldParam="<%= "addressStreet1_" + addressesIndex %>" id="<%= "addressStreet1_" + addressesIndex %>" name="street1" />
</div>