I guess you have an action listener for your ice:commandLink
?. May be that's why you are experiencing such a behavior.
There are two options you can try.
- Use
addJavascriptCall
method ofcom.icesoft.faces.context.effects.JavascriptContext
to call your script within the actionListener. This means, you shouldn't have an onclick script in your link. - Use HTML anchor tag
<a>
instead of<ice:commandLink>
and add your script call to onclick event. You can just style it using ICEfaces style classes.