J
Jan Eliasen
Hi
This problem is a little but difficult for me to explain, but I hope
you will get the idea.
I have some javascript code, where I:
document.getElementById(el).style.display="";
document.getElementById(el).scrollIntoView(true);
so basically, the element was hidden, but I am setting it to
not-hidden, and I want the browser to scroll so the element is visible
by the user. BUT, if the element is allready in the current
browserwindows, then I don't want to scrollIntoView, since this will
move the element - in that case, I'd rather do nothing.
But how do I check for that?
I hope I made myself understandable. The word "hidden" has two menings
in this post - one is that the element is hidden and therefor is not
displayed in the broser no matter how much you scroll. The other is
that the element isn't hidden - you just need to scroll in order to
see it.
--
eliasen, representing himself and not the company he works for.
Private blog: http://blog.eliasen.dk
Private email: (e-mail address removed)
This problem is a little but difficult for me to explain, but I hope
you will get the idea.
I have some javascript code, where I:
document.getElementById(el).style.display="";
document.getElementById(el).scrollIntoView(true);
so basically, the element was hidden, but I am setting it to
not-hidden, and I want the browser to scroll so the element is visible
by the user. BUT, if the element is allready in the current
browserwindows, then I don't want to scrollIntoView, since this will
move the element - in that case, I'd rather do nothing.
But how do I check for that?
I hope I made myself understandable. The word "hidden" has two menings
in this post - one is that the element is hidden and therefor is not
displayed in the broser no matter how much you scroll. The other is
that the element isn't hidden - you just need to scroll in order to
see it.
--
eliasen, representing himself and not the company he works for.
Private blog: http://blog.eliasen.dk
Private email: (e-mail address removed)