# Problem: Launching javascript window from XML file

**URL:** <https://forum.kirupa.com/t/problem-launching-javascript-window-from-xml-file/88692>\
**Category:** flash\
**Created:** [May 1, 2005, 10:04pm UTC](https://forum.kirupa.com/t/problem-launching-javascript-window-from-xml-file/88692 "2005-05-01T22:04:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirenetta1](https://avatars.discourse-cdn.com/v4/letter/s/45deac/32.png) [@Sirenetta1](https://forum.kirupa.com/u/Sirenetta1)\
**Post date:** [May 1, 2005, 10:04pm UTC](https://forum.kirupa.com/t/problem-launching-javascript-window-from-xml-file/88692/1 "2005-05-01T22:04:41Z")

</div>

Hello!

I have a thumbnail gallery that I’d love it so that when the user clicks on a thumb, it launches an HTML page of a news clipping. I’ve tried altering the code for it to do that, but it doesn’t work and I wasn’t sure how the actionscript could recognize the javascript code for the window size.

My code currently is:

```auto
mask_mc._visible = false;
menu_mc.setMask(mask_mc);
portfolioInfo = new XML();
portfolioInfo.ignoreWhite = true;
timeline = this;
portfolioInfo.onLoad = function() {
        portfolioTag = this.firstChild;
        count = portfolioTag.childNodes.length;
        for (i=0; i<count; i++) {
                currentPicture = portfolioTag.childNodes*;
                currentThumb = menu_mc.createEmptyMovieClip("thumbnail"+i, i);
                currentThumb._x = i*40;
                image = currentThumb.createEmptyMovieClip("thumbnail_image", 0);
                image.loadMovie(currentPicture.attributes.THUMB);
                currentThumb.NAME = currentPicture.attributes.NAME;
                currentThumb.IMAGE = currentPicture.attributes.IMAGE;
                currentThumb.onPress = currentThumb.onDragOver=function () {
                        _getURL(this.IMAGE,"_blank" );
                };
        }
};
portfolioInfo.load("portfolio.xml");

```

My XML file looks like:

```auto
  <?xml version="1.0" ?> 
- <portfolio>
  <picture thumb="portfolio_images/thumbs/plug.jpg" image="test.htm" /> 
  </portfolio>

```

What is wrong with this?? Nothing happens when you select a thumbnail. Can you help? I’ll attach my progress to this post!
