954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Getting popups to work in an SWF/XML

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

CCISolitude
Newbie Poster
4 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: