Hi All ,
Thanks for all your previous help.
I have drop down field with id 'am_event' , on change populates another drop
down with id m_speciality . I can see the drop down getting populated in
JSP,but view page source does not show values of drop down 2 , but I have the
values in regenerated source.
On submit of this form , value selected in 2nd drop down (with id m_speciality)
is null in action bean.
Can please give me some tips of how to access this value of newly populated
drop down in action.Any other suggestions much appreciated
<stripes:form name="addMC" action="/com/anoigma/actionbean/AM.action">
<select class="select-event" onchange="poupulateSpeciality()" id="am_event"
name="mc.event.eventId">
<option value="-1" selected>Event...</option>
<option value="1">Chronic conditions</option>
<option value="2">Incidents</option>
</select>
/*below drop down is populated by javascript function poupulateSpeciality()*/
<select name="speciality" id="m_speciality" class="select-speciality"
name="mc.speciality.specialityId">
<option value="-1" selected>Speciality...</option>
</select>
</stripes:form>
//java script function
<script>
function populateSpeciality(){
var f=document.addMC;
f.speciality.options.length=null;
f.speciality.options[0] = new Option("Speciality...");
f.speciality.value[0].value = "-1"
f.speciality.options[0].selected= true
var length = root.childNodes.length ;
f.speciality.options[length] = new Option("Others..",15);
var j = 1
for (i=0;i<length;i++){
var id =
http.responseXML.getElementsByTagName("id")[i].childNodes[0].nodeValue ;
var name =
http.responseXML.getElementsByTagName("name")[i].childNodes[0].nodeValue ;
if(name != 'Others'){
f.speciality.options[j]=new Option(name, id);
j= j+1;
}
}
}
</script>
sneha
Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo!
Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users