Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with a script

Status
Not open for further replies.

AlexDeMarco

Technical User
Joined
Feb 12, 2002
Messages
9
Location
US
to try it

After you submit to the next page and try to resize it the brower want to repost the data, is there any way to get around this? I just want the screen to resize and not repost. Here's the script:

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

<html>
<head>
<title>Untitled</title>
<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot;>
var t;

alow=0;
urlarg = document.location.href;

function rezit() {
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName==&quot;Netscape&quot;) {
if (alow>2) {
document.location.replace(urlarg);}}
document.onload=setTimeout('alow=5',2000);
window.onresize=rezit;
}
if (navigator.appName.indexOf(&quot;Microsoft&quot;)!=-1) {
window.onresize=function(){
if(t)clearTimeout(t);t=setTimeout(&quot;document.location.reload()&quot;,500)
}
}
}
rezit();

</SCRIPT>
</head>

<BODY BGCOLOR=&quot;#ffffff&quot; LINK=&quot;#0000ff&quot; VLINK=&quot;#ff0000&quot; ALINK=&quot;#ff0000&quot; TEXT=&quot;#000000&quot;>
<a href=&quot;#&quot; onclick=&quot;showAll();return false&quot;>Printer Friendly Version</a> | <a href=&quot;#&quot; onclick=&quot;unshowAll();return false&quot;>Reset Display</a>
<script language=&quot;JavaScript&quot;>
var winW = 630, winH = 460;

if (parseInt(navigator.appVersion)>3) {
if (navigator.appName==&quot;Netscape&quot;) {
winW = window.innerWidth-100;
winH = window.innerHeight-300;
}
if (navigator.appName.indexOf(&quot;Microsoft&quot;)!=-1) {
winW = document.body.offsetWidth-100;
winH = document.body.offsetHeight-290;
}
}

function showAll() {
if (document.layers) {
scrolldoc.top = 0;
var l = document.scroll1.document.scroll2;
l.clip.height = l.parentLayer.clip.height = l.document.height;
document.controls.pageY = l.pageY + l.document.height;
document.height = l.pageY + l.document.height + 80;
} else if (document.all)
document.all('scroll3').style.overflow = 'visible';
else if (document.getElementById)
document.getElementById('scroll3').style.overflow = 'visible';
}

function unshowAll() {
if (document.layers) {
location.reload();
} else if (document.all)
document.all('scroll3').style.overflow = 'auto';
else if (document.getElementById)
document.getElementById('scroll3').style.overflow = 'auto';
}

document.write(&quot;<ilayer name='scroll1' width=&quot;+winW+&quot; height=&quot;+winH+&quot; clip='0,0,&quot;+winW+&quot;,&quot;+winH+&quot;'>&quot;);
document.write(&quot;<layer name='scroll2' width=&quot;+winW+&quot; height=&quot;+winH+&quot; bgColor='white'>&quot;);
document.write(&quot;<div id='scroll3' style='width:&quot;+winW+&quot;;height:&quot;+winH+&quot;;background-color:white;overflow:auto'>&quot;);

</script>
<TABLE 1 ALIGN=&quot;nowrap&quot;>
<TR>
<TH width=&quot;180&quot;> </TH>
<TH width=&quot;100&quot;> </TH>
<TH width=&quot;10&quot;> </TH>
<TH width=&quot;20&quot;> </TH>
<TH> </TH>
<TH> </TH>
<TH> </TH>
</TR>

<TR>
<TD ALIGN=&quot;left&quot;>PSR - Instructional </TD>
<TD ALIGN=&quot;right&quot;>0 </TD>
<TD ALIGN=&quot;right&quot;>0.00 </TD>
<TD ALIGN=&quot;right&quot;>0.00 </TD>
<TD ALIGN=&quot;right&quot;>0.00 </TD>
<TD ALIGN=&quot;right&quot;>0</TD>
<TD ALIGN=&quot;right&quot;>0 </TD>
</TR>
</table>
</div>
</layer>
</ilayer>

<script>
var nsstyle='display:&quot;&quot;'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout(&quot;up()&quot;,50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout(&quot;down()&quot;,50)
}

function clearup(){
if (window.temp2)
clearInterval(temp2)
}

function cleardown(){
if (window.temp)
clearInterval(temp)
}
</script>
<div id=&quot;controls&quot; style=&quot;position:absolute;&quot;>
<br><span style=&quot;display:none&quot; style=&{nsstyle};><a href=&quot;#&quot; onMousedown=&quot;up()&quot;
onMouseup=&quot;clearup()&quot; onClick=&quot;return false&quot; onMouseout=&quot;clearup()&quot;>Up</a> | <a href=&quot;#&quot;
onMousedown=&quot;down()&quot; onMouseup=&quot;cleardown()&quot; onClick=&quot;return false&quot;
onMouseout=&quot;cleardown()&quot;>Down</a> | <a href=&quot;#&quot; onClick=&quot;if (document.layers) scrolldoc.top=0;return false&quot;>Top</a> | <a href=&quot;#&quot; onClick=&quot;if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false&quot;>Bottom</a></span>
<tt>This page was created on 23-JAN-02</tt></div>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top