leehinkleman
Programmer
This link,
<a href="javascript:void(0);" onClick="javascript:wO(this,'Halfback',714,265)">Halfback</a>,
if clicked while the page is loading, causes incomplete page loading.
Using a non-javascript href(like href="#" or href="#Halfback" allows the page to finish loading, but I just wanted to eliminate the effects of the page jumping to locations within the page with href="#" or href="#Halfback".
The function wO is
function wO(t,n,w,h){
tl=t;
nam=n;
wid=w;
hei=h;
if(wok<1){
setTimeout("wO(tl,nam,wid,hei)",999);
return;
}
if(pup){
pup.close();
}
t=n.replace(/_/g," ");
wp=w+20;
hp=h+60;
n="z='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+wp+',height='+hp;
pup=window.open('','',z);
with(pup.document){
open();
writeln('<html>');
writeln('<head><title>'+t+'</title></head>');
writeln('<body>');
writeln('<center>');
writeln('<b><a href="javascript:self.close()">Close Window</a></b>');
writeln('<img src="'+n+'" width='+w+' height='+h+' alt="'+t+'"><br><b>'+t+'</b>');
writeln('</center>');
writeln('</body>');
writeln('</html>');
close();
}
pup.focus();
}
and variable wok is assigned a value of 0, but is assigned a value of 1 when the page body loads, with the intention of waiting until the page was loaded, before allowing the popup.
With the href="#", this works, with the annoying page jumps.
Can those page jumps be eliminated without using href="javascript:void(0);", which could cause more catastrophic failure? Thanks for your advice.
<a href="javascript:void(0);" onClick="javascript:wO(this,'Halfback',714,265)">Halfback</a>,
if clicked while the page is loading, causes incomplete page loading.
Using a non-javascript href(like href="#" or href="#Halfback" allows the page to finish loading, but I just wanted to eliminate the effects of the page jumping to locations within the page with href="#" or href="#Halfback".
The function wO is
function wO(t,n,w,h){
tl=t;
nam=n;
wid=w;
hei=h;
if(wok<1){
setTimeout("wO(tl,nam,wid,hei)",999);
return;
}
if(pup){
pup.close();
}
t=n.replace(/_/g," ");
wp=w+20;
hp=h+60;
n="z='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+wp+',height='+hp;
pup=window.open('','',z);
with(pup.document){
open();
writeln('<html>');
writeln('<head><title>'+t+'</title></head>');
writeln('<body>');
writeln('<center>');
writeln('<b><a href="javascript:self.close()">Close Window</a></b>');
writeln('<img src="'+n+'" width='+w+' height='+h+' alt="'+t+'"><br><b>'+t+'</b>');
writeln('</center>');
writeln('</body>');
writeln('</html>');
close();
}
pup.focus();
}
and variable wok is assigned a value of 0, but is assigned a value of 1 when the page body loads, with the intention of waiting until the page was loaded, before allowing the popup.
With the href="#", this works, with the annoying page jumps.
Can those page jumps be eliminated without using href="javascript:void(0);", which could cause more catastrophic failure? Thanks for your advice.