• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Spring AJAX problem  RSS feed

 
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
 
author
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
 
mooooooo ..... tiny ad ....
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!