Q: You said you don't want to send a request to the server at all,
right? The anchor is really just a placeholder... a place for people to
click to get at some sort of functionality, right? Thus, the browser
shouldn't take you anywhere; the url should be a moot point, right?
If that is the case, then your javascript is borked.
You need: onclick="return jsFunction()" and your js function needs to
return false.  Alternatively, you could do:
onclick="jsFunction();return false";
If that still doesn't work, then your js is still borked; the js
interpreter to dying trying to interpret your js, before it gets tot he
"return false".

If I'm misunderstanding what you're trying to do, my apologies. I'll
readily admit to having only hastily read any of the msgs in this thread.

Robert

Chris Norris wrote:
> I don't think tapestry is trying to fix anything up for me here. It seems
> like the browser has the wrong idea of what it should append the # to. To
> make sure thought I tried the following things:
> 
> <a jwcid="@Any" href="ognl:'#'" onclick="jsFunction();">
> <a jwcid="@Any" href="ognl:getLink()" onclick="jsFunction();">
> <a jwcid="@Any" href="ognl:link" onclick="jsFunction();">
> 
> They all do the same thing. The onclick is called, and then I am sent to the
> home page.
> 
> On 11/1/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
> 
>>
>>Chris,
>>
>>In my example the "ognl:getLink()" function was actually calling
>>through into a page function to get the link.
>>
>>So you could then put a method like:
>>
>>public String getLink() {
>>return "#";
>>}
>>
>>On your page which should bypass tapestry trying to fix it up for
>>you (I hope).
>>
>>--- Pat
>>
>>>-----Original Message-----
>>>From: Chris Norris [mailto:[EMAIL PROTECTED]
>>>Sent: Tuesday, November 01, 2005 9:12 AM
>>>To: Tapestry users
>>>Subject: Re: anchor tags
>>>
>>>I tried this:
>>>
>>><a jwcid="@Any" href="#" onclick="something();">
>>>
>>>This does the exact same thing. I try it with a getLink() method because
>>
>>I
>>
>>>don't really want a link. I don't want a request sent to the server at
>>>all.
>>>
>>>On 11/1/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
>>>
>>>>
>>>>Have you tried the any tag?
>>>>
>>>><span jwcid="@Any" element="a" href="ognl:getLink()">
>>>><span jwcid="@RenderBody" />
>>>></span>
>>>>
>>>>>-----Original Message-----
>>>>>From: Chris Norris [mailto:[EMAIL PROTECTED]
>>>>>Sent: Tuesday, November 01, 2005 8:52 AM
>>>>>To: Tapestry users
>>>>>Subject: anchor tags
>>>>>
>>>>>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>
>>>>>
>>>>>The url of the page was something like this:
>>>>>http://localhost:8080/app?page=SomePage&service=page
>>>>>
>>>>>I would think that mousing over the link would give me something
>>
>>like
>>
>>>>>this:
>>>>>http://localhost:8080/app?page=SomePage&service=page#
>>>>>
>>>>>Instead, I got this: http://localhost:8080/#
>>>>>That just sends me to the home page. This is not the desired
>>>>>functionality.
>>>>>This is so basic, and I feel like I'm missing something obvious.
>>>>>
>>>>>-Chris
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to