I am converting a pure JSP page into Struts, and am having problem
converting links which calls a javascript and has dynamically specified
target. The particular line is below:
<a href="javascript:if (confirm('Do you want to delete this event?'))
location = 'delete.jsp?e=<%= EventId %>'" class="eventheaderlink">Delete</a>
My current converted line reads:
<a href="javascript:if (confirm('Do you want to delete this event?'))
location = '/EventDelete.do?e=<bean:write name="EventForm"
property="eventId"/>'" class="eventheaderlink">
but I cannot find an equivalent using <html:link>, problem being I cannot
add the closing single quote back (or more generally stated, I cannot have
"constant"+variable+"constant" in the link). My attempt:
<html:link href="javascript:if (confirm('Do you want to delete this
event?')) location = '/EventDelete.do" paramId="e" paramName="EventForm"
paramProperty="eventId" styleClass="eventheaderlink">
is missing the last ' and causes error.
So is there a way to do this in <html:link>?
And is there a need to convert all <a> to <html:link> in the first place?
Because I am also having problem converting
<a href="mailto:<%= htmlescape(contactemail) %>" class="eventemaillink"><%=
htmlescape(evcontactemail) %></a>
into <html:link>, since there is no paramId that I can specify, and using
paramId always automatically add a ? to the created link.
Thanks in advance on any pointers,
Ricky Purnomo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]