Ok, let me see if I've got it.
In a JSP, you have exactly this code (along with other unimportant stuff
before it and after it):
function swapAction( formName, action) {
formAction = document.getElementById( formName ).action;
newAction = '<html:rewrite page="/'+action+'.do"/>';
document.getElementById( formName ).action = newAction;
}
And this code then gets sent to a browser (shows up in view source) as
the following:
function swapAction( formName, action) {
formAction = document.getElementById( formName ).action;
newAction = '/nda/'+action+'.do';
document.getElementById( formName ).action = newAction;
}
Is that right?
- Dave
> -----Original Message-----
> From: Rick Reumann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 15, 2004 10:26 AM
> To: Struts Users Mailing List
> Subject: Re: how about some clarification vs saying things are
ludicrous [partially OT]
>
> Durham David R Jr Contr 805 CSPTS/SCE wrote the following on 9/15/2004
> 9:58 AM:
>
>
> > If we may take a more civil tone, do you still feel this way? Why
don't
> > you just try to actually use this function:
> >
> > function swapAction( formName, action) {
> > formAction = document.getElementById( formName ).action;
> > newAction = '<html:rewrite page="/'+action+'.do"/>';
> > document.getElementById( formName ).action = newAction;
> > }
> >
> > And then post your results.
>
> As an example of working HTML it produces:
>
> function swapAction( formName, action) {
> formAction = document.getElementById( formName
).action;
> newAction = '/nda/'+action+'.do';
> document.getElementById( formName ).action =
newAction;
> }
>
> Which is EXACTLY what I what I expected and wanted. And when I use the
> fucntion, it swaps out the form action name with whatever newAction
> equates to. Works perfectly. Although I am giving Michael's
> SimpleDispatchAction a whirl today.
>
> An example submit button calling the swapAction:
>
> <html:submit onclick="swapAction( 'userSearchForm',
> 'userSearchPerform')">SEARCH</html:submit>
>
> Works perfectly.
>
> No hard feelings.
>
> --
> Rick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]