Hi All
I'm using an onchange event of a select field to trigger the elements within a
div to be replaced via an ajax call. This works perfectly in FireFox, but in IE
6 and IE 7, the form fields are not posted with the ajax call. So I cannot tell
what has been selected in the select field.
How can I make IE include the form fields in the ajax request?
Any solutions would be greatly appreciated.
I'm using Struts 2.08 . Below is my jsp code.
This code is in head.
<s:head theme="ajax" debug="true"/>
<script>
function show_details() {
alert(document.getElementById("reportingCalendar").value);
dojo.event.topic.publish("show_detail",
document.getElementById("reportingCalendar").value);
}
</script>
This code is in body:
<s:form id="publicationsReport" action="reporting.action" method="POST"
theme="simple" cssClass="awesomeform">
<s:hidden id="id" name="id" value="${id}" />
<label for="reportingCalendar"><fmt:message
key="reporting.reportingCalendar"/></label>
<s:select onchange="javascript:dojo.event.topic.publish('show_detail');return
false;" id="reportingCalendar" list="reportingCalendarList" theme="ajax" />
<s:url id="d_url" action="reportingYears.action"/>
<s:div showLoadingText="false" id="details" href="%{d_url}" theme="ajax"
listenTopics="show_detail" formId="publicationsReport">
<s:hidden id="fromYear" name="fromYear" />
<s:hidden id="toYear" name="toYear" />
</s:div>
<s:submit showLoadingText="false" value="Generate Report" />
</s:form>