Forums de discussion

how to use .html?

Ramya Sree Kalagiri, modifié il y a 11 années.

how to use .html?

New Member Publications: 8 Date d'inscription: 19/12/12 Publications récentes
Hi,
I'm using alloy UI in my jsp page and My code goes like this



                                              <aui:select class="comboboxStyle" d="state" name="state" onclick="showState();" style="width:200px; height:25px">
						 	<aui:option value="-1">Select state</aui:option>
						</aui:select>
                                                 <aui:script>
                                               showState(){
                                              AUI().use('aui-io-request',function(A){
                                               A.one('#<portlet:namespace />state').html('<aui:option value="1">AP<aui:option><aui:option value="2">UP</aui:option>');
                                                 });
                                            }

</aui:option></aui:option></aui:script>


My problem is when at runtime instead of replacing the above code as below

   <aui:select class="comboboxStyle" d="state" name="state" onclick="showState();" style="width:200px; height:25px">
						 	<aui:option value="1">AP</aui:option>
                                                        <aui:option value="2">UP</aui:option>
			</aui:select>



it the result was like this

 <aui:select class="comboboxStyle" d="state" name="state" onclick="showState();" style="width:200px; height:25px">AP UP<aui:select>

</aui:select></aui:select>



what might be the problem? Am I missing anything? Please help me out. Thanks in advance
thumbnail
Rajeeva Lochana .B.R, modifié il y a 11 années.

RE: how to use .html?

Junior Member Publications: 67 Date d'inscription: 04/01/10 Publications récentes
Hi Ramya,

use onChange attribute instead of onClick.

I hope this link helps. Click here