Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Aug 2000
    Location
    Beaverton, OR
    Posts
    3,267

    Question Layer PopUs - Toggle them on/off and allow more than one open?

    Is there a way to use Layer PopUps in the following manner:

    Click Button A and Layer A opens and stays open unless Button A is clicked again.

    Click Button B and Layer B opens. Its contents are shown along with A's contents if A (or any other Layer PopUps are displayed)

    =============================================

    Basically I'm looking to imitate what happens with the Layer Gallery when "ticking" the visibility of individual layers.

    If this method in not workable, then could separate on-off buttons be used?

    Other methods?


    JC
    IP

  2. #2
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    Perhaps this thread can help you?
    http://www.talkgraphics.com/showthread.php?t=36782
    John.
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Beaverton, OR
    Posts
    3,267

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    Here is my first attempt.

    1- I tried to make three blue buttons toggle their associated layer both on and off.

    2- I noticed that new duplicate layers (ie., rectangle (2)) were created on some pages and objects being place on those duplicate layers. I believe it was because I had typos in the javascript for the object names. Not sure though, just a hunch.

    3- Also, can the yellow shapes on each page with the javascript be removed and the javascript be added to the Page's Tracker field?

    JC
    Attached Files Attached Files
    Last edited by jclements; 13 March 2009 at 04:16 PM.
    IP

  4. #4
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    Quote Originally Posted by jclements View Post
    1- I tried to make three blue buttons toggle their associated layer both on and off.
    But this script does not allow to make toggle buttons. Please read that thread carefully. It's not exactly what you were asking for, but it is somwhat close. You need separate button for close. Though, if you are smart, you can place the close button on the popup layer right over the open button, so that it will look like the same button used ot open and close.
    2- I noticed that new duplicate layers (ie., rectangle (2)) were created on some pages and objects being place on those duplicate layers. I believe it was because I had typos in the javascript for the object names. Not sure though, just a hunch.
    I'm not quite sure if I understand you correctly. Anyway, it can't be due to the typo in script. BTW, on the second page of that thread there's a new working script. The one you use is not reliable.
    3- Also, can the yellow shapes on each page with the javascript be removed and the javascript be added to the Page's Tracker field?
    Yes. You can even add it to the website tracker field, then it will be added to all pages at once.

    Ok. So the first look at your document revealed several mistakes. You were not following that instruction carefully, were you?
    So, I think I'll give you simplistic demo file which do something close to what you want. Please analize carefully all the URL links, placeholders and object names.
    Hope it helps.
    Attached Files Attached Files
    Last edited by covoxer; 13 March 2009 at 06:20 PM.
    John.
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Beaverton, OR
    Posts
    3,267

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    Hi, John.

    1- I was a better student today. I studied your file and then modified it a bit to handle two pages and added the script to the web tracker as you suggested. Requires attention to detail as you can't simply make a duplicate copy of a page and have the names and links change accordingly. (Be kind of neat if you could somehow drag from a button to an object or group to create a link association in manner similar to how you can drag from one text frame to another text frame).

    2- I did learn something new. That when you copy attributes (Ctrl-C) from one object and paste them to another (Ctrl-Shift-A), the object names are copied as well. If the object you are pasting attributes to, already has a name, the pasted name is added to the target object and does not replace it.
    Attached Files Attached Files
    IP

  6. #6

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    I'm trying something similar and need a bit of help. I have a page with 4 coloured 'tabs' on the mouseoff layer. I then have 4 seperate layers so when the user clicks a 'tab' that specific layer pops up (see image). This works well but I have two problems.

    1/. I want the first layer to be visible when the page loads. I have the visibility layer ticked in the layers panel when I save but it doesn't show.

    2/. I want the layer to be always visible until the user clicks another tab, at the moment the layer hides when the user clicks anywhere else.

    Any help appreciated.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Clipboard01.jpg 
Views:	244 
Size:	12.4 KB 
ID:	57608  
    IP

  7. #7
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    1/. Make the tab that has to be opened at page load static.
    2/. Use the method described here: http://www.talkgraphics.com/showthread.php?t=36782 for all other tabs.
    John.
    IP

  8. #8

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    Thanks John.

    I tried following that thread but:

    3. Insert following string to the URL field of the object that will close the pop up:

    javascript:my_close('mypopup1')
    How can I hide multiple layers and only open the one when the user clicks on the relevant tab? There is no close button to close itself so I'd need to hide all other layers and just show one.
    IP

  9. #9
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    Ah, I see. Well, wouldn't it be easier to make a separate page for every tab?
    John.
    IP

  10. #10
    Join Date
    Aug 2000
    Location
    Beaverton, OR
    Posts
    3,267

    Default Re: Layer PopUs - Toggle them on/off and allow more than one open?

    Yeh, Nicki, I tried to think of other ways using this as a basis but gave up. May someone can tweek it to do what you had in mind.

    This uses John's concept of locking a layer popup until you click on an object on that popup layer which contains the close-javascript method. But of course, it only closes itself.

    JC
    Attached Files Attached Files
    IP

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •