• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts and YUI Connection Manager

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need help with a web application I'm working on where I'm replacing its html frames with div layers and utilizing the YUI connection manager to update the appropriate div layers.

The application framework is struts2 which needs to remain, as all of the application relies on the struts tags.

When submitting a form in the application I have included a Javascript call which uses the yui connection manager to call the action form and method which gets back the correct response from the server, however after the javascript executes, the struts framework kicks in and submits the form thus updating the whole page with the response rather than just a particular div layer.

So apart from removing the struts tags in the jsp's, which isn't really an option as this would require the whole front end to be re-written, does anyone know how I can stop struts submitting the form or intercept it to forward its reponse into the YUI Connection Manager? (YUI Connection Manager can use POST and GET)

Thanks
M
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you don't want the normal HTML form submission to take place the onsubmit JavaScript function should return "false".

This isn't Struts-specific.
 
m nhk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much David you have saved me a lot of work for something so simple! And appologies for not posting it in the right place.
 
reply
    Bookmark Topic Watch Topic
  • New Topic