# Popup Window Variable to Browser?

**URL:** https://forum.kirupa.com/t/popup-window-variable-to-browser/60661
**Category:** flash
**Created:** [August 11, 2004, 1:28pm UTC](https://forum.kirupa.com/t/popup-window-variable-to-browser/60661 "2004-08-11T13:28:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![RichGags](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/richgags/32/685_2.png) [@RichGags](https://forum.kirupa.com/u/RichGags)
#### Post date: [August 11, 2004, 1:28pm UTC](https://forum.kirupa.com/t/popup-window-variable-to-browser/60661/1 "2004-08-11T13:28:05Z")

</div>

I have created a picture gallery within Flash with 20 or so small pictures. When I click on a picture, I would like to open a page called “picture.html” with attributes. Ive got it working, sort-of, with the following code I found here on this site (thanks! by the way)

in my button I have:

on (release) {  
//customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “picture.html”;  
target\_winName = “kirupa”;  
width = 800;  
height = 500;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 1;  
resizable = 0;  
//sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

…and in a Actions layer, I have:

\_global.openWinCentre = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {  
getURL(“javascript:window.open(’”+url+"’,’"+winName+"’,’"+“width=”+w+",height="+h+",toolbar="+toolbar+",location="+location+",directories="+directories+",status="+status+",menubar="+menubar+",scrollbars="+scrollbars+",resizable="+resizable+",top=’+((screen.height/2)-("+h/2+"))+’,left=’+((screen.width/2)-("+w/2+"))+’"+"’);void(0);");  
};

Anyway, its working fine, except I would like to know if its possible to have only 1 “picture.html” file for all my 20 pictures in the photo gallery.

I know that somewhere within picture.html, I need to open an image.jpg. I would like to pass the big picture’s file name to the picture.html page from the flash button. So, how would I pass “picture1.jpg” to “picture.html”, and within “picture.html” how would I open an image from a variable?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 11, 2004, 4:41pm UTC](https://forum.kirupa.com/t/popup-window-variable-to-browser/60661/2 "2004-08-11T16:41:56Z")

</div>

You need server side scripting for that.

In PHP it would look something like:

```php

<img src="<? print $picurl; ?>">

```

now pass the variable picurl via the get string to picture.php

[AS]  
address = “picture.php?picurl=picture1.jpg”;  
[/AS]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 11, 2004, 4:47pm UTC](https://forum.kirupa.com/t/popup-window-variable-to-browser/60661/3 "2004-08-11T16:47:32Z")

</div>

Thanks for your help. Now how do I set up the server side scripting? or how would I know if its already there?

Rich

> [@cycom](#):
>
> You need server side scripting for that.
> 
> In PHP it would look something like:
> 
> ```php
> 
> <img src="<? print $picurl; ?>">
> 
> ```
> 
> now pass the variable picurl via the get string to picture.php
> 
> [AS]  
> address = “picture.php?picurl=picture1.jpg”;  
> [/AS]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 11, 2004, 5:44pm UTC](https://forum.kirupa.com/t/popup-window-variable-to-browser/60661/4 "2004-08-11T17:44:57Z")

</div>

To test if PHP is running on the server upload a file named ‘test.php’ and put \<? phpinfo(); ?\> in it.  
When you open that file through the server it should show a lot of information about PHP and which version the server is running and whatnot. If you see nothing - bad luck :hair:

To run PHP locally (on your computer) you’ll need to install an apache server and php, which can be quite tricky. :h:

There’s a package called phpdev, try googling for it, it installs and configures apache + php ( + mySQL) pretty nicely.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 11, 2004, 5:47pm UTC](https://forum.kirupa.com/t/popup-window-variable-to-browser/60661/5 "2004-08-11T17:47:19Z")

</div>

Thanks!
