I prefer the <a href="javascript:" ></a> method as well. It's less typing ;)


On 11/4/05, Chris Conrad <[EMAIL PROTECTED]> wrote:
>
> A bunch of other people have provided you with some good info but
> people missed one point.
>
> On Nov 1, 2005, at 8:51 AM, Chris Norris wrote:
>
> > I feel like quite the noob with this question:
> >
> > How do I do anchor tags in Tapestry? My real goal is to have a link
> > that
> > doesn't go anywhere and just calls a javascript function. This was
> > what I
> > tried:
> > <a href="#" onclick="someJavascriptFunction();">Click me!</a>
>
> To prevent the browser from following the link you need to format
> your onclick line like this:
>
> <a href="#" onclick="someJavascriptFunction();return false">Click me!
> </a>
>
> Notice the 'return false;'. This is also necessary for form submit
> fields if you don't want the form to actually submit.
>
> --Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to