> 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!)
I tested the code -- not that I needed to do so, but still.
Just throw it into a JSP and look at the resulting HTML.
Here's an index.jsp that I've ran in Tomcat 5.x:
<html>
<head>
<script>
function swapAction( formName, action) {
formAction = document.getElementById( formName ).action;
newAction = '<html:rewrite page="/'+action+'.do"/>';
document.getElementById( formName ).action = newAction;
}
</script>
<body>
</body>
</html>
I really hope that I don't need to go further with this. In the words
of Mike Tyson, "This is ludicrous!"
- Dave
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]