Add one line, as below.

On Dec 10, 2008, at 6:50 AM, Cyrus wrote:

> Hi,
> I just programmed a simple show/hide feature: You click on a link and
> extra information is displayed. Click again and it is hidden.
> The link has a href like "#moreInfoContent". When I add an
> onclick="return false;" I have the desired result that the href is not
> displayed in the addressbar. When I try to add this return false in my
> javascript (unobstrusive) it doesn't work for me. The link is
> displayed in the adress bar so the browser jumps to that position.
> [snip]

> function openMoreInfo(event) {


>       if (Element.hasClassName(this, 'more')) {
>               new Effect.BlindUp(this.identify() + 'Content', { duration: 0.2 
> });

> [snip]

You may want to change the use of the word event as a private  
variable, I know that IE can sometimes get cranky about that (at least  
that's been my apocryphal observation). I use evt, personally, or some  
variation like that.

Also, the syntax I wrote works for Prototype 1.5 and up, but the  
modern cool 1.6+ way would be to write it as event.stop() (or  
evt.stop() if you're me).


You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at

Reply via email to