# Loading centred popup with dynamic content?

**URL:** https://forum.kirupa.com/t/loading-centred-popup-with-dynamic-content/60282
**Category:** Uncategorized
**Created:** [August 8, 2004, 4:06pm UTC](https://forum.kirupa.com/t/loading-centred-popup-with-dynamic-content/60282 "2004-08-08T16:06:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mindfriction](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mindfriction/32/172_2.png) [@mindfriction](https://forum.kirupa.com/u/mindfriction)
#### Post date: [August 8, 2004, 4:06pm UTC](https://forum.kirupa.com/t/loading-centred-popup-with-dynamic-content/60282/1 "2004-08-08T16:06:33Z")

</div>

Hi,  
Im trying to extend the photo gallery ive been making so that users can click for an enlarged image and have a “print friendly” window…  
I realise there is an internal print function in flash but my client is unhappy with my implementation of that and would rather the use of the browsers internal **File\>Print** functionality. …I figured I could pass the image url and title to a popup window (using kirupa’s centred popup tute)…But alas simply opening the image isn’t enough… I need to have the image centred (within a table) with text underneath (simple description of image)…and the window sized appropriately for the whole content 😉

How would I do this? Im quiet good at PHP, so I figured the solution is somewhere around passing the img url, title and description as variables in the querystring to a php file. But im puzzled as how to achieve this as well as the centred popup affect…

Kirupa’s centred popup proto…

```auto

Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) { 
	getURL ("javascript:var myWin; if(!myWin || myWin.closed){myWin = 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 + "))+'" + "')}else{myWin.focus();};void(0);", "_self","GET");
}

```

What ive been looking at…(this of course is the url paramater of the function above)

```auto

address = "php/print.php?url="+galleryNode.attributes.directory+"/"+imageNode.attributes.jpegURL+"&title="+imageNode.attributes.title;

```
