wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts and YUI Connection Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts and YUI Connection Manager " Watch "Struts and YUI Connection Manager " New topic
Author

Struts and YUI Connection Manager

m nhk
Greenhorn

Joined: Aug 02, 2009
Posts: 2
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
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Aug 02, 2009
Posts: 2
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.
 
GeeCON Prague 2014
 
subject: Struts and YUI Connection Manager