Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1

    Default "Closing" a popup layer

    Hi everyone,
    This one is so simple I must be missing something.

    In the attached web file you will see a button that displays a popup layer called "My Popup Layer".

    Clicking the "Show popup layer" button makes this layer appear, which is exactly what I want. But I would like to then "close" the popup layer by clicking on the X button on the popup layer (like a window). This does not work.

    But if I click on the big grey rectangle in the popup layer then the popup layer DOES go away.

    My settings:

    To make the layer appear I go to the Web Properties for the "Show popup layer" button, and tell the Popup layer to appear when I click the button.

    So then to make the popup layer go away I assumed that I go to the Web Properties for the "X" button and enter "My Popup Layer" again in the popup layer action. So in other words I'm assuming this action is like a toggle switch.

    But it doesn't seem to work that way.

    I'm confused.

    Ideally I would only like the popup layer to go away when the user clicks the X area, and not when they click the big grey rectangle.

    Cheers,
    Geoff
    Attached Files Attached Files

  2. #2

    Default Re: "Closing" a popup layer

    You need the locking popups tweak in the tweakset.

    http://www.talkgraphics.com/showthread.php?t=37684

  3. #3

    Default Re: "Closing" a popup layer

    Hi Sledger,
    Wow - that was a fast response! Thanks.
    I will give that a go.

    Cheers,
    Geoff

  4. #4

    Default Re: "Closing" a popup layer

    Hi Sledger,
    The good news is that the tweak you suggested is exactly what I need. I see it working in the help file, and that's what I want!!!

    The bad news is I cannot get it to work that way in my web file.

    I dragged the xar file for the tweak onto my page, and I see it there with instructions.

    I thought I followed the instructions, but to be honest they're not very clear. For example:

    1. On the pop up layer, add unique name to any non-text object.

    I think I'm doing this. I have three objects on my popup layer. The background, some text, and the little black box I want to close the popup.

    So I named the background object "Popup_BG" and the little black square "mypopup1" (so I don't have to change the Javascript). I didn't name the text object because it's a text object and the instructions imply that I don't need to name it. (Should I soft-group the objects on the popup layer or something?? I haven't, but just wondered if I should).

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

    javascript:my_close('mypopup1')

    Repleace 'mypopup1' with the name you have given to the object on the popup layer that you want to be closed by this link.


    I have not followed this instruction literally. I have retained the single quotes in 'mypopup1' - I tried deleting them but it produced the same error.

    I also don't know what the "URL Field" is. The closest I can guess is that the instruction should read:

    2. For the object that you will use to close the popup layer, open its Web Properties dialogue, and in the Link Tab, select "Link to web address" and enter the following JavaScript:

    javascript:my_close('mypopup1')

    Where 'mypopup1' is the name that you gave to the object that will close the popup layer.


    That's the closest I can find to a "URL field" for a given object. Anyway, that's what I did. Maybe there's a URL field hiding somewhere else that I haven't seen yet

    When I run this web file I get an error dialog that I have captured in the attached JPG. I've also included my web file FYI.

    By the way - the short instruction in the embedded tweak don't mention how to open the popup layer - so I'm using my "Show Popup Layer" button. But the longer instructions mention something about a my_open function (but only at the end - it's not clear that I have to use this to open the popup layer). Is that what I'm doing wrong?

    I know this is me doing something wrong because the helpfile stuff works. Can you see my mistake? I really appreciate the help.

    If I can get this simple example working maybe I can create a simple video tutorial to help out.


    Cheers,
    Geoff
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	error.JPG 
Views:	211 
Size:	18.2 KB 
ID:	63894  
    Attached Files Attached Files

  5. #5

    Default Re: "Closing" a popup layer

    I went through this process once before and and experienced a bit of confusion my self. I've just run though the process again, and get the same results as you are experiencing. Apparently we need some external perspective to nudge us along.
    Attached Files Attached Files

  6. #6

    Default Re: "Closing" a popup layer

    Hi Curtis,
    It's good to know I'm not alone

    Cheers,
    Geoff

  7. #7

    Default Re: "Closing" a popup layer

    I ran through this process previously and came to a successful conclusion (with an exercise that was more complex than this). Perhaps you can learn something from the documented experience (if you have the patience). This is about where I came into the discussion: see post #113

  8. #8

    Default Re: "Closing" a popup layer

    Thanks Curtis - I will give this a try tomorrow. Sleepy now

  9. #9

    Default Re: "Closing" a popup layer

    Look at this small .web file.

    I used the locking popup for the gallery thumbs.
    Click GALLERY then on the drop-down click 'Click me'
    The Gallery Thumbnails popup will open, but clicking away from it won't close it due to the Locking Popup script*.
    The thumbnails image (not text object) has been named 'mythumbs'
    Clicking the 'CLOSE ' link under the thumbnails will close it as it has the script in the URL field as mentioned in the tweak( javascript:my_close('mythumbs') )

    *Go to line mode (wireframe) and you will see where I hid the 'locking popup' placeholder
    Click image for larger version. 

Name:	locking-popup-tweak.png 
Views:	255 
Size:	66.2 KB 
ID:	63902

    So:
    The Locking popup script is plopped onto the page somewhere (and optionally shrunked and coloured to hide)
    The GALLERY link opens the GALLERY popup layer which has a link to open the *locked* GALLERY-more layer.
    The GALLERY-more layer has the thumbnails image which has the name 'mythumbs' applied to it (this relates to the locking popup script).
    A new link on the GALLERY-more layer, just under the thumbnails image has the javascript string inserted into the URL field (ie; Link to web address) and the string is modified to the same name you use for the (not text) object on the layer you want the link to close, in this case 'mythumbs'.

    I hope that was clear.
    It's quite simple really
    Attached Files Attached Files

  10. #10

    Default Re: "Closing" a popup layer

    Curtis, in future - please wait the 7 minutes it took you to post again (where you'd sussed it out) because after your first post asking for 'external perspective' someone ( ) might have been spending a lot of time preparing an answer

    LOL...

    Anyway - hope this helps

 

 

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
  •