Click to See Complete Forum and Search --> : Problem


Johanvh
03-31-2003, 06:46 AM
I use following script to resize the windowsize:

<html>
<head>
<titlte>Size</title>
<script>
function document_onload()
{
self.resizeTo(600,600);
self.moveTo(100,100);
}
</script>
<head>
<body onLoad="document_onload()">
<body>
</html>

Everything is OK when using on a page without frames but doensn't work with frames.

Does anyone know a solution or another script to resize a page with frames.

Johan.

khalidali63
03-31-2003, 06:54 AM
Its the scope problem

change your javascript as below

<script type="text/javascript">
function document_onload(){
self.resizeTo(600,600);
self.moveTo(100,100);
}
window.onload = document_onload;
</script>

change this line
<body onload=".....">

to

<body>

Cheers

Khalid

Johanvh
03-31-2003, 07:01 AM
I tryed this code, you're right.
Thanks

Originally posted by khalidali63
Its the scope problem

change your javascript as below

<script type="text/javascript">
function document_onload(){
self.resizeTo(600,600);
self.moveTo(100,100);
}
window.onload = document_onload;
</script>

change this line
<body onload=".....">

to

<body>

Cheers

Khalid