February 15th, 2000, 09:56 AM
I am on a chat and it works quite good, but there is a problem. Because I fetch all the data out of a database and do not want to refresh the page every 5 seconds, I got the problem that the Browser shows just the beginning of the document while the new text is below and is not seen.
Is there a tag or something that tells the browser to move to the end of the page? I tried it with JavaScipt (scrollBy), but as soon as I called the function twice it stopped working!
Please do not mind my bad english!
February 15th, 2000, 10:55 AM
Not that I can think of right now. But you can get around it by displaying it in a textbox. If a textbox overflows it automatically scrolls to the bottom:
<textbox name="whatever"><? print $output text ?></textbox>
The other added benefit is you don't have to worry about embedded scripts being executed as the browser won't interpret anything placed in a textbox.
February 16th, 2000, 03:30 PM
There is a easy solution for this prob.
For my own chatsystem I simply called a Java function that contains this:
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
if (browserName == 'Netscape' && browserVer >= 3) version = 'NC';
if (browserName == 'Microsoft Internet Explorer' && browserVer >= 4) version = 'IE';
var pageY = 50000;
Guess this will do it .. otherwise drop me a note ,)