Open a layer and close the others
Hy all,
I have run into this problem and it seems I don't know how to fix it although I've tried many combinations.
I use <Locking Popups> in my site and I have on the page ~ 20 different images. If I click on any of them, it opens up their corresponding layer (which is the same image, fixed in the same position but slightly enlarged upwards). And I want to use Link Function not Mouse Over.
All the things should go as it follows: (I made sure to insert in <Web Properties> for each layer, the corresponding value:
<javascript:my_close('Popup_1_BG');javascript:my_c lose('Popup_2_BG')......javascript:my_close('Popup _20_BG')> as I have seen in the tutorial.)
So, I click a photo, then its layer comes into view, and after I click the layer, the layer disappear with all the other layers.
The problem is that I need to have only one layer at a time and when I click another photo its layer appears too....and here is the trouble....-----> a part of it appears under others layers which was previously opened!! And because the layers are 600px x 700 px, I am forced to open those layers and see only half of them.
Of course if I click on any layer, oll the others that was opened before will close down, but what should I do, when clicking a photo, his corresponding layer to open up at least in front of any other layer (which was opened before)?
For any reason I do not know why it's not possible to have 2 commands on a button/image like in this example:
Web Properties-Link-When the selected object is clicked -->
Popup layer: opens our layer
Link to Web or Email address: ....to close a chosen layer/s
Any chance to make my dream come true with Xara Web Designer 6 ?
Re: Open a layer and close the others
Hi Antonium,
I'm not sure if I understand you entirely. If you mean what I think you mean (namely how to open one popup and close another in one click), I did a demo of how to achieve this on another forum called Xara Users. The link to the thread in question is here.
I hope that helps,
Eric
Re: Open a layer and close the others
Hi Antonium, could you upload your .web / .xar file so we can see the problem?
Re: Open a layer and close the others
Hi,
I believe the Open /close javascript the layer names have to be lower case aand the xara layer names lower case.
Jim
Re: Open a layer and close the others
The layer name should include (lock) to make it a locking layer. Create a button for each layer [a simple graphic of a cross for instance] and this takes the code. See point #10 here :)
1 Attachment(s)
Re: Open a layer and close the others
Hello there!
I uploaded my demo site. Click to solo layer onto "Home Page", to remove all that annoying layers that keeps appear on the front page.
So, after I tryed some of the possibilities I ended up with what you see. My layers still opens one after another (after I click their corresponding image) and not one at a time. And more of this, the last layer (one of the three above) keep appearing underneath the beneath ones even if I click it last.
If I could make those layers/popups appear like when HTML Placeholder "Locking Popups" is removed....will be awesome.
I can not remove that placeholder, because I want to add in the future tho possibility to change backgrounds. To do this I'll have to add in the background each desired image to fill the entire background screen, than, for each bg added to insert a button which opens up the chosen bg and closes down all the others (I have no other ideea to apply here to make useful of "Don't scroll background" for each background I choose)...but this is other cup of coffee.
Re: Open a layer and close the others
Hi Antomium. There are some advanced layer controls available which allow multiple layers to be opened and closed with one click. I'm not sure if this is what you are wanting, but if it is, I've produced a video tutorial here which shows how this works.
Re: Open a layer and close the others
Thank you Xhris, your tutorial was very helpful.
I don't want to make things complicated with many popup layers waiting in the background soI'll stick with your example of making every image from the page a "Popup Photo" (in the Web Properties window).
So I deleted all my previously created layers from the Page&Layer Gallery, and those associated images dissapeared from Bitmap Gallery, too.
I saved the site but when I loaded again I realized that the size of the site remained the same!!!
And I said "WOW!! That's not possible! I've deleted some photos and the size of the site had to be reduced as well...like when you spend some money buying something, than your pocket gets empty." But that didn't happened with the size of my site.
Do you happen to know how I can reduce that 3.77 MB in size. It looks like, I can delete all the images from the site and the site will have the same size whatever I do.
Re: Open a layer and close the others
Hi. Are you referring to the size of the native .xar file or the size of the exported website? If you're referring to the website size, then I have a video detailing site optimisation techniques which I just produced which may help. If you're referring to the native xar file size, then it's a bit difficult to say what's going on without seeing the two xar files themselves. A typical way to reduce the size of the native xar file is to optimise all photos in the document to avoid saving unnecessary bitmap data in overly high resolution photos.
Re: Open a layer and close the others
You could try deleting everything in your export folder and your online folder then export and publish anew :) As I understand it, deleting images from your .xar won't necessarily mean they've gone from the index_html_files folder.