Re: [Proto-Scripty] Problem with link after Effect.Appear

2010-09-15 Thread Johan Arensman
I'm not totally sure what you're trying to do but perhaps you can use
scrollTo() to scroll to the specified element?

http://api.prototypejs.org/dom/element/scrollto/

You'll have to use id instead of name (which is the correct way of using
anchors).

Greetings,
 Johan

On Tue, Sep 14, 2010 at 1:26 PM, Riccardo  wrote:

> Hello everyone,
>
>I have a strange problem and I think I need you help. I use
> scriptaculous.js v1.8.3 for a very simple thing, when a user click a
> link a division appear. Easy.
>
>Now, the division once invisibile contains a very long text with
> couple of link of the form
>
>
>
>This links are placed before main chapters of the text, letting
> the user jumo to some point without scrolling. Now, what I' like to do
> is having a list of chapters OUTSIDE from the invisible division, and
> when a user click the link
>
>1. The division appear
>2. The browser will get to the internal link
>
>What i did is a simple javascript
>
> function linkChapter(chapName) {
>
>Effect.Appear("bookOne", {  duration: 0.15 , afterFinish:function()
> { document.location.href(chapName); } } );
>
> }
>
>And every link OUTSIDE the invisible division will launch this
> script with the appropriate chapName. Now, this does not work. In a
> wird way.
>
>- The division appear correctly
>- The link does not work
>and
>- If a click the link when the division is visible (after the
> effet,. with another click) the link works !
>
>I tried different things, none of them working. Do you think is a
> problem of the DOM not refreshing the new links ? Any help appreciated
>
>Ricardo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> prototype-scriptacul...@googlegroups.com.
> To unsubscribe from this group, send email to
> prototype-scriptaculous+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



[Proto-Scripty] Problem with link after Effect.Appear

2010-09-14 Thread Riccardo
Hello everyone,

I have a strange problem and I think I need you help. I use
scriptaculous.js v1.8.3 for a very simple thing, when a user click a
link a division appear. Easy.

Now, the division once invisibile contains a very long text with
couple of link of the form



This links are placed before main chapters of the text, letting
the user jumo to some point without scrolling. Now, what I' like to do
is having a list of chapters OUTSIDE from the invisible division, and
when a user click the link

1. The division appear
2. The browser will get to the internal link

What i did is a simple javascript

function linkChapter(chapName) {

Effect.Appear("bookOne", {  duration: 0.15 , afterFinish:function()
{ document.location.href(chapName); } } );

}

And every link OUTSIDE the invisible division will launch this
script with the appropriate chapName. Now, this does not work. In a
wird way.

- The division appear correctly
- The link does not work
and
- If a click the link when the division is visible (after the
effet,. with another click) the link works !

I tried different things, none of them working. Do you think is a
problem of the DOM not refreshing the new links ? Any help appreciated

Ricardo

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.