Ok here’s the thing. I want some of my links to point to an IFrame. But there are some links that I want to open in a new window. I modified the code to open all links in my IFrame. But what about the ones I want to open in a new window.
is there anyway to detect what the item name is, and link it appropriatly. also please don’t think im just shooting questions at you, i have tried this and honestly am kind of lost
Well looks, like I answered my own question. the script already detects if a button has a subnav. if it does i targeted it to my IFrame, if not it opens a new window. woOt!
ok it turns out i didnt fix it. here’s the issue. the way my code is constructed now is all links that do not have sub links open s is a new window. that is not the way it should be. i need to specify which inks need to opne in my IFrame, and which should open in a new window. how can i go about doing this?
Ok, you know how in the code you have a line like this [AS]myButton.myUrl = menuItem*.attributes.URL;[/AS] and [AS]mySubButton.myUrl = this.subMenuItem[j].attributes.URL;[/AS]
Well these pull the attributes from the XML tag. To make custom targets for each you would need to add another attribute into the XML tag in the XML file and pull that in. First let is deal with the AS…
Add [AS]myButton.myTarget = menuItem*.attributes.TARGET;[/AS] under [AS]myButton.myUrl = menuItem*.attributes.URL;[/AS]
Add [AS]mySubButton.myTarget = this.subMenuItem[j].attributes.TARGET;[/AS] under [AS]mySubButton.myUrl = this.subMenuItem[j].attributes.URL;[/AS]
Now change both getURLs in the script to read [AS]getURL(this.myUrl, this.myTarget);[/AS]
Now let us move onto the XML file. We will now add an attribute called “TARGET” to each of the tags. An example would be as follows…
<SUBITEM NAME="Submenu Link 1" URL="sublink1.html" TARGET="_blank" />
or
<SUBITEM NAME="Submenu Link 1" URL="sublink1.html" TARGET="frameName" />
LIB, works beautifully. Thank you for guiding me through this somewhat complicated navigation system. First time working with XML and Flash. I go to learn a lot from this.