D
dillon
Hi everyone
I'm writing a javascript/php chat script, but I've run into a problem
that is probably very, very simple to fix but I don't have a clue.
The problem is with an iframe (should I be using an iframe in the first
place?) that shows all the chat so far - all I want to do is get the view to
scroll to the bottom of that iframe when it first loads or refreshes.
That's the entire problem in a nutshell! Lines of text are added to the
bottom of the file shown in the iframe, but when the number of lines exceeds
the height of the iframe the vertical scrollbar appears (which is desirable)
but the new conversation is hidden off the bottom.
The reason for the iframe btw is that I couldn't find a compatible way
of updating part of a page without using form elements, and I want to use
things like different font colours for different users in the chat pane,
which I can't with form elements.
Any tips or a possible fix for this would be greatly appreciated, and
particularly cross-browser working example code
This has got a lot longer than I expected, I'd better go to bed now,
Cheers in advance to anyone who can help
dillon
I'm writing a javascript/php chat script, but I've run into a problem
that is probably very, very simple to fix but I don't have a clue.
The problem is with an iframe (should I be using an iframe in the first
place?) that shows all the chat so far - all I want to do is get the view to
scroll to the bottom of that iframe when it first loads or refreshes.
That's the entire problem in a nutshell! Lines of text are added to the
bottom of the file shown in the iframe, but when the number of lines exceeds
the height of the iframe the vertical scrollbar appears (which is desirable)
but the new conversation is hidden off the bottom.
The reason for the iframe btw is that I couldn't find a compatible way
of updating part of a page without using form elements, and I want to use
things like different font colours for different users in the chat pane,
which I can't with form elements.
Any tips or a possible fix for this would be greatly appreciated, and
particularly cross-browser working example code
This has got a lot longer than I expected, I'd better go to bed now,
Cheers in advance to anyone who can help
dillon