Re: Scrolling browser to newly visible panel?

2007-10-11 Thread Gwyn Evans
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:

Scrolling browser to newly visible panel?

2007-10-10 Thread Gwyn Evans
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

Re: Scrolling browser to newly visible panel?

2007-10-10 Thread Gerolf Seitz
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

Re: Scrolling browser to newly visible panel?

2007-10-10 Thread Nathan Hamblen
Gwyn Evans wrote: 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? findpos(elem) has worked well for me on