alu, artifex wrote:

i need to rewrite an action uri for use in a javascript function, something like this:
----------
function foo()
{
document.location.href=<html:link action="/foo/bar" paramId="blah" paramName="blah"/>;
}
----------
however the <html:link> renders html code which i can't use in my javascript function.
the <html:rewrite> tag doesnt provide support for the "action" attribute (which, imho, renders
the "transaction" attribute useless). do i have to define an actionforward for the action (seems like
rewrite can render an actionforward) or is there a better approach? my application depends
heavily on javascript operations like this so i have to define an actionforward for nearly every
single action.


thanks in advance,
art

I'm not entirely sure why the Struts team left out the 'action' attribute for the html:rewrite tag, but what we've done in the www.fiskars.com site is simply use the page attribute, appending the '.do' manually. Certainly not as clean, and it breaks best practice, but it works ... that's how we've gotten URLs into javascript.

--
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to