struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McGrady <m...@michaelmcgrady.com>
Subject Re: Trying to come up with a Mapping-Dispatch combo Action
Date Tue, 14 Sep 2004 17:10:27 GMT
Don't worry, David, this is a list for exchanging ideas.  Yours are 
appreciated. 

However, I think you are mistaken in this instance.  I am fairly sure 
that is the case, since this code has been run and works. 

Please correct me if I am wrong, but I think that you think that somehow 
the <html:rewrite page="/'+action+'.do"/> is going to show up in the 
response object and be present in the JavaScript on the page, which 
would be bad.  However, that is not the case.  What shows up on the page 
is the result of <html:rewrite page="/'+action+'.do"/>.  The JSP page is 
going to create a servlet which will really run this and it is going to 
print out not this code but the result of the code.  If this were not 
possible, we could not use taglibs in HTML.  We on the same page?  (Not 
trying to be sardonic!)

Michael McGrady

>Here's the original code:
>
>function swapAction( formName, action) {
>     formAction = document.getElementById( formName ).action;
>     newAction = '<html:rewrite page="/'+action+'.do"/>';
>     document.getElementById( formName ).action = newAction;
>}
>
>  
>
>Yeah, I'm right.  That no one sees it is blowing my mind ... sorry, I
>can't let it die.
>




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message