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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

something about Netscape

Status
Not open for further replies.

rogerluo

Programmer
Aug 13, 2001
21
0
0
GB
Hi all,

i got a instereting question about Netscape:

firstly my code as below:

<html>
<head><script language = &quot;javascript&quot;>
function testing(){
var place = document.frmMain.text.value;
var total =number*place;
if(document.layers)

{
var Lname = 'PosReturn';
var y = document.layers[Lname];
y.document.open();
y.document.write('total number is: '+total);
y.document.close();
}

}
</script>
<STYLE TYPE=&quot;text/css&quot;>
<!--
#PosReturn {position: absolute;
top: 100px;
left: 400;
width:200 ;
padding: 2px;
}
--></STYLE>
</head>

<link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style/ie_instantbet.css&quot;><script language=&quot;JavaScript&quot; src=&quot;js/form_validation.js&quot;></script>
</head>
<body onload=&quot;window.resizeTo(500,500);&quot;>

<form name=&quot;frmMain&quot; action=&quot;default.asp&quot; method=&quot;POST&quot; >

<center>
<table NAME=&quot;BettingSlip&quot; Border=&quot;0&quot; Cellpadding=&quot;0&quot; width =&quot;&quot; Cellspacing=&quot;0&quot; align=&quot;center&quot; >
<tr>
<td colspan=&quot;4&quot; class=&quot;a-9-w-b-c-dg&quot; align=&quot;center&quot; height=&quot;30&quot;><b>DHTML for Netscape</b></td>
</tr>
<tr><td height=&quot;1&quot; colspan=&quot;4&quot;></td></tr>
<tr>
<td class=&quot;a-10-w-b-r-lg&quot; width=&quot;200&quot; height=&quot;17&quot;>Event Date:</td>
<td width=&quot;3&quot;></td>
<td colspan=&quot;2&quot;>Dec 9 2001 4:00PM</td>
</tr>
<tr><td height=&quot;1&quot; colspan=&quot;4&quot;></td></tr>

<tr>
<td class=&quot;a-10-w-b-r-lg&quot; width = &quot;200&quot;>Number</td>
<td width =&quot;1&quot;></td>
<td><input type=&quot;text&quot; size=&quot;5&quot; maxlength=&quot;7&quot; name=&quot;text&quot; onkeydown=&quot;testing(8);&quot;></input></td>
<td><DIV ID=&quot;PosReturn&quot; ></DIV></td>
</tr>
</table>
</center>
</body></html>

see i resize the window size, however, it cause the function testing() doesn't work. i do know 'NN4 looses positions and style definitions of layer when resizing the browser window', but i don't know how to solve it out (and resize is very necessary here).

Thanks,



 
Hi,

I just use what dreamweaver provides, it does not seem to cause a problem then,

HOWEVER it does cause the page to reload.

Here is the script from dreamweaver:

<script language=&quot;JavaScript&quot;>
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName==&quot;Netscape&quot;)&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>

James
 
Hi,

Just thinking of something else, can you not just open the window at 500 by 500 rather then having to resize it? Then you would not need the above code.

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top