I have a problem with a call a Javascript "window.ope n()" function which is
executed as part of a PHP file when a user clicks on an thumbnail image.
The PHP is executed which passes some variables to Javascript to execute
the new window opening. But as it does this, the main window is loaded
which is blank (the browser URL bar shows the URL of the URL passed to the
PHP / Javascript script).
I would like to keep the gallery page visible in the main page which is
where the link originally came from, so the user can see the gallery
underneath the "popup" window of the called graphic.
I don't know how much of an added problem it is, but the script that
generates the whole sites pages is in the root directory, and the gallery
HTML is in some seperate sub-directory and is "included" into the page
layout (using variables passed on a page click).
Any help appreciated.
Dariusz
Gallery script calling the PHP file to execute on image thumbnail click:
<a href="php/pics.php?&gal=c oll01&picID=01" ><img
src="img/gallery1/s-dg01.jpg" ALT="Picture 1" width="30"
height="69"></A>
<a href="php/pics.php?&gal=c oll01&picID=02" ><img
src="img/gallery1/s-dg02.jpg" ALT="Picture 2" width="74"
height="69"></A>
This passes the variables to the other PHP script which picture to grab.
PHP file with the Javascript (pics.php):
<?PHP
// Section to generate the Javascript pop-up for correct
// dimentions of the proposed pop-up.
$URL = '..img/gallery1/dg'.$_GET['picID'].'.jpg';
print "<script type=\"text/javascript\">
<!--
var Jurl=\"$URL\";
";
?>
window.
open(Jurl,"Pict ure","width=370 ,height=260,too lbar=no,menubar =no,
resizeable=no") ;
//-->
</script>
executed as part of a PHP file when a user clicks on an thumbnail image.
The PHP is executed which passes some variables to Javascript to execute
the new window opening. But as it does this, the main window is loaded
which is blank (the browser URL bar shows the URL of the URL passed to the
PHP / Javascript script).
I would like to keep the gallery page visible in the main page which is
where the link originally came from, so the user can see the gallery
underneath the "popup" window of the called graphic.
I don't know how much of an added problem it is, but the script that
generates the whole sites pages is in the root directory, and the gallery
HTML is in some seperate sub-directory and is "included" into the page
layout (using variables passed on a page click).
Any help appreciated.
Dariusz
Gallery script calling the PHP file to execute on image thumbnail click:
<a href="php/pics.php?&gal=c oll01&picID=01" ><img
src="img/gallery1/s-dg01.jpg" ALT="Picture 1" width="30"
height="69"></A>
<a href="php/pics.php?&gal=c oll01&picID=02" ><img
src="img/gallery1/s-dg02.jpg" ALT="Picture 2" width="74"
height="69"></A>
This passes the variables to the other PHP script which picture to grab.
PHP file with the Javascript (pics.php):
<?PHP
// Section to generate the Javascript pop-up for correct
// dimentions of the proposed pop-up.
$URL = '..img/gallery1/dg'.$_GET['picID'].'.jpg';
print "<script type=\"text/javascript\">
<!--
var Jurl=\"$URL\";
";
?>
window.
open(Jurl,"Pict ure","width=370 ,height=260,too lbar=no,menubar =no,
resizeable=no") ;
//-->
</script>
Comment