• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring AJAX problem

 
Bill Wied
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to perform a "simple" AJAX remoting call (see JSP segment below) to allow the states/provinces to change based on the country selected.

<div class="required">
<form:select id="selectCountry" path="countryCd" onchange="alert('hello');Spring.remoting.submitFor m('selectCountry', 'accountUpdate', {_eventId:'selectState'});return false;alert('goodbye');">
<form:option value="XX"> </form:option>
<form:options items="${countries}" itemValue="countryCd"
itemLabel="countryName" />
</form:select>
</div>

I get the following console error when I change the selected country:
Spring is not defined.

I am using annotated controllers. I must not have included something in my configuration.

Your help would be appreciated.

Bill
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I played with it a long long time ago so this is a shot in the dark.

Did you add some dependency for the js file it needs?

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic