GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   javascript question (https://gfy.com/showthread.php?t=415444)

Zester 01-12-2005 06:58 AM

javascript question
 
after you open a popup, how does javascript know the opened document window has fully loaded and finished? there is a way in javascript to do that, I did it once...

mortenb 01-12-2005 07:40 AM

in the body tag of the document in the popup you can put onLoad="somefunction();"

like <body onLoad="wheeimloaded('not rich');">

Zester 01-13-2005 02:57 AM

Quote:

Originally Posted by mortenb
in the body tag of the document in the popup you can put onLoad="somefunction();"

like <body onLoad="wheeimloaded('not rich');">

thanks, but the problem is it's at another domain and I have no control over it - that will give me "Access Denied"

celebx 01-13-2005 05:43 AM

<script>
function functionname() {
alert();
}

w=window.open('url');
w.document.onload=functionname; // no ()
</script>

Zester 01-13-2005 06:06 AM

Quote:

Originally Posted by celebx
<script>
function functionname() {
alert();
}

w=window.open('url');
w.document.onload=functionname; // no ()
</script>

same problem: "Access Denied"

celebx 01-13-2005 06:20 AM

<script language="Javascript" type="text/javascript">
function functionname() {
alert();
w.focus();
}

function openWindow(url) {
w=window.open('about:blank');
w.document.open();
w.document.write('<html>' +
'<head><title></title></head>' +
'<body style="padding:0px;margin:0px;border:groove 2px;">' +
'<iframe src="' + url + '" name="displayframe" frameborder="0" style="width:100%;height:100%;" onload="window.opener.functionname()"></iframe>' +
'</body></html>');
w.document.close();
}

openWindow('http://www.google.com/');
</script>

Twe Russ 01-13-2005 06:21 AM

Nice..........


All times are GMT -7. The time now is 01:33 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123