If you don't have to use struts' ajax tags, my experience is there are
much better options out there for ajax purposes. Plus their ajax tags
have been deprecated.
JQuery does Ajax very easily. I was able to get it working in a few
hours after struggling with AJax tags for days.
Try this demo:
http://15daysofjquery.com/quick-and-dirty-ajax/14/
eric
martin.pien...@csiro.au wrote:
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>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org