Thanks, I've gone with 


            target.appendJavascript(

                    "document.getElementById('" + form.getMarkupId() + "').scrollIntoView(false);"

            );


in the onClick(), which seems to do just what I need.


/Gwyn


On Wednesday, October 10, 2007, 9:18:58 PM, Gerolf <[EMAIL PROTECTED]> wrote:


>

i found two possibilities to do this (although i haven't tried it with wicket ajax):


var el = document.getElementById('panelInsertedViaAjax');

1)

document.getElementsByTagName('body')[0].scrollTop = el.offsetTop + el.offsetHeight;

2)

el.scrollIntoView(false);

// false to position it to the bottom of the page

// true for the top


Gerolf




On 10/10/07, Gwyn Evans <[EMAIL PROTECTED]> wrote:

Just wondering if there was anything that might help with the

following?


In a web page design I've been given, I may need to display an

'options' form to get additional input.  I'm doing this with Ajax, 

but the problem is that it typically appears off the bottom of the

existing page - is there a good way of triggering the browser to do

something like scroll down, ideally to the bottom of the new form?


-- 

Best regards,

Gwyn                          mailto:[EMAIL PROTECTED]



--------------------------------------------------------------------- 

To unsubscribe, e-mail: [EMAIL PROTECTED]

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






/Gwyn

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

Reply via email to