Simon/Jeff
I tried "return false" and it worked. what is weird though is that i tried
function submitThis(){
window.open('attachments.xhtml');
return false;
}
and it did not work. hmmmm javascript....
Let me also try t:outputLink; wait let me edit my tomahawk taglib first.
Thanks
-Steve
Simon Kitching wrote:
Simon Kitching wrote:
Steve Torrefranca wrote:
Hi,
How do we prevent form submission? I have a link that opens a new
window:
<t:commandLink value="LINK"
onclick="window.open('attachments.xhtml?commEmailID=#{communication.id}')"
/>
My problem is, that the form that has the link gets submitted to the
server as it opens a new link. How do we prevent such behavior?
This is a common javascript problem: add ";return false" to your
onclick attribute.
Umm..and what Jeff said too :-). Presumably t:outputLink is also what
you want..