CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   Simple but ugly! (http://www.codingforums.com/showthread.php?t=273835)

docco 09-22-2012 12:30 PM

Simple but ugly!
 
I display a window by using all javascript

myWindow = window.open();
myWindow.document.write();
........................................
.......................................
myWindow.focus();

I want after the window load, it will be updated in oder to add some children in it.
Then I add
...............................
myWindow.document.write("<body onload=\"updateValue()\">");
.................................

This does not work, I understand.

Then I change to
...................................................
myWindow.document.write("<body onresize=\"updateValue()\">");
...............................................

and add
............................................
myWindow.resizeTo(500,400);
myWindow.focus();

This works but sometimes value updated sometimes value not updated!
I add more resize.
...................................
myWindow.resizeTo(50,40);
myWindow.resizeTo(40,50);
myWindow.resizeTo(500,400);
myWindow.focus();

The result is that the update not 100% done.

Can anyone help for a solution?


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.