CCISolitude 0 Newbie Poster

Hi all,

I'm in the middle of making a new website for myself. A part of the website has an animated tag cloud, which in of itself, I've managed to get working just fine.

Currently the tag entry in the XML looks like this:

<tag linkURL="aboutme.html" priority="5" text="About Me" target="_blank"/>

Which all works fine and well with everything else, except, as you can probably tell, it opens up the url in a new page.

What I've been trying to wrestle with is getting it to open in a popup, and I've tried a rack of different code generators to try and find something that would work, but those things can only get you so far, and I'm at a loss (webdesign really isnt my forte..)

As best I can tell, its the target line that needs to be replaced with a bit of javascript, with a section in the head like this:

<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=250,height=400');");
}
</script>

and then a section for the link that looks something like this:

<A HREF="javascript:popUp('aboutme.html')">About Me/A>

Unfortunately, I've been wrestling with it for a little over a day now (I'm pretty sure I dreamt about it as well last night) I've tried a rack of different ways of putting it together, and none of my methods have worked, some have merely not done anything, and some have made the XML file fail and the page hasn't loaded it at all.

Any guidance will be well received

Regards

Rob

Dani AI

Generated

For : the tag XML you show only hands a URL and a target to the SWF. To get a sized browser popup you must have the SWF ask the page to call window.open(...) — that cannot reliably be done by just changing the XML target value. Two pragmatic routes:

If you can change the SWF (ActionScript 3): call JavaScript from Flash using ExternalInterface. Example pattern:

import flash.external.ExternalInterface;

function onTagClick(url:String):void {
  if (ExternalInterface.available) {
    ExternalInterface.call("window.open", url, "popup" + new Date().getTime(), "width=500,height=400,toolbar=0,scrollbars=1");
  } else {
    navigateToURL(new URLRequest(url), "_blank");
  }
}

Also make sure the HTML that embeds the SWF sets allowScriptAccess="always" so the SWF can call page JS:

<object ...>
  <param name="allowScriptAccess" value="always" />
</object>
<embed ... allowScriptAccess="always" />

If you cannot edit the SWF (or it’s AS2): getURL("javascript:...") sometimes works but is fragile with modern players and browsers; it also requires allowScriptAccess and may be blocked. A practical fallback: pre-open a named popup from the page (via window.open) and use the SWF’s target name so the SWF loads content into that pre-opened window — useful when modifying the SWF isn’t possible.

Troubleshooting notes: popups are often blocked unless opened synchronously from a user click, so ensure the call happens inside the click handler. Test ExternalInterface.available, watch the browser console for errors, and keep a navigateToURL(..., "_blank") fallback. See Adobe’s ExternalInterface docs and MDN’s window.open reference for details and browser behavior: ExternalInterface (AS3) and Window.open (MDN).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.