--- Fred Moyer <[EMAIL PROTECTED]> wrote:
> If you post a code snippet that might give us some
insight into what the problem is.
>
CGI Code snippet is below.
While my goal was to include the <?xml... line, I
also found that removing the <DOCTYPE... line from the
output also makes the JavaScript work (working as in
the value of .scrollTop doesn't remain as 0 as you
scroll down).
#!/usr/bin/perl
use strict ;
use warnings ;
use CGI ;
my $q = new CGI ;
# Build the JavaScript
my $javascript = qq|
var timer
function scrolltop() {
timer=setTimeout("scrolltop()",1000) ;
document.getElementById('scrollLocation').innerHTML
= document.body.scrollTop ;
}
function stoptimer() {
if(timer) clearTimeout(timer) ;
}| ;
# Generate the CGI HTML
print $q->header(),
$q->start_html( -title=>'Scroll Test',
-script=>{-code=>$javascript},
-onload=>"scrolltop();",
-onunload=>"stoptimer();" ) ,
'<h1>Scroll Test</h1><br/></br/>',
'<p>scrollTop = <span
id="scrollLocation"></span></p><pre>' ;
print "$_\n" for(1..1000) ;
print "</pre>" , $q->end_html ;
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail