You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mucus snot <mu...@virgin.net> on 2004/03/02 23:19:02 UTC
html:link problem
Hi list,
Just wondering if anyone has any bright ideas. Things that you can do
easily with an <a ...> tag, are not (easily) acheivable with a <html:link>.
For instance in the following code:
<nested:iterate id="title" name="<%= Constants.TITLES_COLLECTION %>"
scope="request" indexId="counter">
<html:link page="/findtitles.do"
onmouseover="MM_swapImage('details<%= counter %>,...)"...
</nested:iterate>
counter will not resolve, although it will if the tag is an ordinary anchor.
Does anyone know a way around this? I have been resorting to using ordinary
<a...> tags but have just realised that there is no session control if
cookies are disabled. I have to use html:link...
thanks, al
Re: html:link problem
Posted by Nick Wesselman <nw...@halleonard.com>.
Make your entire onmouseover attribute an expression.
onmouseover="<%="MM_swapImage('details"+counter+"," ... %>"
You can have plain text or a run-time expression as an attribute, but
not both. Hope this helps.
Nick
mucus snot wrote:
> Hi list,
>
> Just wondering if anyone has any bright ideas. Things that you can do
> easily with an <a ...> tag, are not (easily) acheivable with a
> <html:link>. For instance in the following code:
>
> <nested:iterate id="title" name="<%= Constants.TITLES_COLLECTION %>"
> scope="request" indexId="counter">
> <html:link page="/findtitles.do"
> onmouseover="MM_swapImage('details<%= counter %>,...)"...
> </nested:iterate>
>
> counter will not resolve, although it will if the tag is an ordinary
> anchor.
>
> Does anyone know a way around this? I have been resorting to using
> ordinary <a...> tags but have just realised that there is no session
> control if cookies are disabled. I have to use html:link...
>
> thanks, al
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: html:link problem
Posted by Mark Lowe <ma...@talk21.com>.
When i have the misfortune of porting the mother of all abominations
known as dreamweaver generated code I tend to use <c:url instead
<a href="<c:url value="/findtitle.do" />"
this will do what i think you want.
On 2 Mar 2004, at 23:19, mucus snot wrote:
> Hi list,
>
> Just wondering if anyone has any bright ideas. Things that you can do
> easily with an <a ...> tag, are not (easily) acheivable with a
> <html:link>. For instance in the following code:
>
> <nested:iterate id="title" name="<%= Constants.TITLES_COLLECTION %>"
> scope="request" indexId="counter">
> <html:link page="/findtitles.do"
> onmouseover="MM_swapImage('details<%= counter %>,...)"...
> </nested:iterate>
>
> counter will not resolve, although it will if the tag is an ordinary
> anchor.
>
> Does anyone know a way around this? I have been resorting to using
> ordinary <a...> tags but have just realised that there is no session
> control if cookies are disabled. I have to use html:link...
>
> thanks, al
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org