Quote Originally Posted by Frodo View Post
Hi Acorn,
Thanks for the response. I actually used your method, as per your link. Been using that for quite some time for these situations. So I prefer to not have a Close shape, as the other "Open" shapes for all the other popup layers already includes the close command for any and all popups, bar the one being opened.
The question is more aimed at putting a single link on a page (Page A) that will do 3 things:
1. From page A Direct you to another page (Page B)
2. Ignore above mentioned Java Script that opens the "first" popup layer by default
3. Open the desired popup layer as specified within the link on Page A
Does this make sense? I tried creating a link within the first field of the properties of my link on page A in a misguided attempt, something to this effect:
page:"B", popup:"layer4", close:"layer1","layer2","layer3" etc...
This obviously failed. I tried a few other iterations with and without quotation marks, also tried using: page:"B.html", popup:"....etc...". Without success. Does this shine any more light?
The Xara undocumented popup code does not work across pages. i have also just checked and my code, equally, will not function across pages.

The trick is yet more code.
If the url has a hash, jump to that anchor on the layer (e.g., url#fred --> open page with Layer Fred open).
If no hash, open page with default Layer (e.g., Layer Spam; same as url#spam).

The code will be something like:
Code:
<script>  var hash= location.hash.substr(1);
  if (hash == "") {
    xr_v1(document.getElementById('banner').parentNode.parentNode);
    }
  else {
    xr_v1(document.getElementById(hash).parentNode.parentNode);
    }
</script>
To open the Spam layer, the calling Link will be <Page filename>.htm#spam.
To open the default pop-up layer (banner), the calling Link is the normal <Page filename>.

This code allow for any number of pop-up layers.
You set the default by changing "banner".

Acorn