Jump to content

Is there a way to autoscroll with php?


soma56

Recommended Posts

Let's say I had an array of results coming in line-by-line and a placed it around a nice CSS box:

 

 

<html>
<head>

<title>My Super List</title>
<style>
div.customScroll {position:absolute; top:30px; overflow:scroll; margin-left:0px; left:20%; width:350px; height:420px; border:2px lightblue solid!important; }
</style>
</head>

<body>

<div class="customScroll">
<?PHP

# Importing My Clean Data
$data = explode("$cleaned_data"); 
echo $value . "<br />" . PHP_EOL;
flush();
    ob_flush();
    usleep(50000);
}
}


?>

</div>

</body></html>

 

So everything transfers nicely to a box. However if the information is long wouldn't it be nice if the box automatically scrolled with the data so users could read it as it came in rather then being "stag-net" at the top as the array fills in.

 

Link to comment
https://forums.phpfreaks.com/topic/204669-is-there-a-way-to-autoscroll-with-php/
Share on other sites

Let's say I had an array of results coming in line-by-line and a placed it around a nice CSS box:

 

 

<html>
<head>

<title>My Super List</title>
<style>
div.customScroll {position:absolute; top:30px; overflow:scroll; margin-left:0px; left:20%; width:350px; height:420px; border:2px lightblue solid!important; }
</style>
</head>

<body>

<div class="customScroll">
<?PHP

# Importing My Clean Data
$data = explode("$cleaned_data"); 
echo $value . "<br />" . PHP_EOL;
flush();
    ob_flush();
    usleep(50000);
}
}


?>

</div>

</body></html>

 

So everything transfers nicely to a box. However if the information is long wouldn't it be nice if the box automatically scrolled with the data so users could read it as it came in rather then being "stag-net" at the top as the array fills in. I've tried the CSS overflow:auto; and it doesn't work. Does anyone have any suggestions for PHP?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.