Ellie a écrit :
>
My code looks like this:
<a href="#" onClick="window.open('enrollwindow.php', 'WindowD',
'width=750,height=900,scrollbars=yes');">
Here, in your code, 'WindowD' is html name of the popup
You'l use it thru html code : target="WindowD"
It is of no interest in JavaScript (JS doesn't know this WindowD)
I tried to put your code in this statement but it opens up a blank
page. I don't understand where in the process it finds the variable I
sent it. I never refer to the variable name in Window B.
We have window (A) with file ie :'ellie.php'
contains
<a href="#"
onClick="window.open('../quotescreenwindow.php?enroll_id=enrollwindowprime. php',
'WindowB', 'width=750,height=800,scrollbars=yes');">
with enroll_id=enrollwindowprime.php after ? in called url
So, from window (A) you'l open a new popup (B)
with a target of no utility named WindowB
an displaying file 'quotescreenwindow.php'
This file 'quotescreenwindow.php' in popup (B)
only needs to catch from it's self url what is after '='
in order to can open next popup (C)
'quotescreenwindow.php' will be something as :
<html>
<head>
<script type="text/javascript">
var newFile = self.location.toString().split('=')[1];
</script>
</head><body>
<a href="#"
onclick="
truc = window.open('','','width=750,height=800,scrollbars =1');
truc.location = newFile;
return false;"Popup C </a>
</body></html>
explain :
while downloading the file 'quotescreenwindow.php' in window (B)
browser's javascript will immediately read
newFile = self.location.toString().split('=')[1];
- newFile
is a variable (global)
- self.location.toString().split('=')[1]
translation :
url of displayed file in present window considered as a string
then, using '=' as separator, extract second element
result :
from now, javascript knows the next file to call
newfile = 'enrollwindowprime.php';
The link's onclick :
truc = window.open('','','width=750,height=800,scrollbars =1');
truc.location = newFile;
return false;
- truc will be javascript name of the new popup window (C)
(empty window on this instant)
- truc.location = newFile;
url called in window 'truc' to display is newFile
that's to say 'enrollwindowprime.php'
- return false;
to stop the href of link
--
Stephane Moriaux et son [moins] vieux Mac