Ajax actions and Form Beans

Normally, we can execute a Struts actions thru Ajax like the following Javascript lines

var url = "myStrutActions.do?parm1=parrm1val&parm2=parm2val&.."

loadURL(url, AjaxTriggerFunction);

where loadURL is the Ajax function to execute the Struts actions.

My question is instead of passing literal parameters like parm1, parm2, etc. is it possible that we can pass a form bean ?

One problem with passing literal parameters is HTTP GET paramaters have limited length.

Thanks

[522 byte] By [timhuya] at [2007-11-27 10:49:35]
# 1

I am not sure about passing the form bean since the form is not submitted when using ajax request.

You can use POST with ajax . So the problem with limited length can be avoided.

http_request.open('POST', url, true);

HTH

R@njita at 2007-7-29 11:20:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

thanks. this works.

timhuya at 2007-7-29 11:20:11 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...