RE: [PHP] Flush()....go to bottom of page (might be 0T)

2004-08-09 Thread Ford, Mike [LSS]
On 07 August 2004 23:24, PHP Gen wrote:

 This is what i am using:
 
 for($i=0; $i1000;$i++)
 {
 echo somethingbr;
 echo str_repeat( , 256);   flush();   ob_flush();
 sleep(1);
 }

Regardless of solving your scrolling problem, these flush calls are the
wrong way round -- ob_flush() flushes to the layer which is flushed by
flush(), so you should be doing

ob_flush(); flush();

to get an immediate flush of the thing just echoed.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Flush()....go to bottom of page (might be 0T)

2004-08-07 Thread John Holmes
PHP Gen wrote:
Hi,
I am using flush() and ob_flush() in one of my scripts
and its working great.., just one problem, as it keeps
outputting x on the screen the page just stays on
top...is there anyway (I am not sure via php...but
maybe JavaScript? ) to make the browser follow the
output below
Not with PHP. Use Javascript's scroll properties/methods/whatevers... :)
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Flush()....go to bottom of page (might be 0T)

2004-08-07 Thread PHP Gen

--- John Holmes [EMAIL PROTECTED] wrote:

 PHP Gen wrote:
  Hi,
  I am using flush() and ob_flush() in one of my
 scripts
  and its working great.., just one problem, as it
 keeps
  outputting x on the screen the page just stays
 on
  top...is there anyway (I am not sure via php...but
  maybe JavaScript? ) to make the browser follow
 the
  output below


 
 Not with PHP. Use Javascript's scroll
 properties/methods/whatevers... :)
 

Yeah, thought so. Dont know JS that well though (been
a long time) so will have to search the web.

Thanks anyway.
Mag

=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php