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

    Question Can a PopUp Layer be triggered when a new page is opened?

    Upon going to a new page via a PageNext or PagePrevious button, is there a way to automatically trigger a PopUp Layer?
    IP

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

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Well, not without scripting again I'm afraid.

    1. You'll need to have a button that opens the pop-up because othervise it will be not recognized as a pop-up. This has to be on-click pop-up (select pop-up layer in the Link tab "Popup layer" field).
    2. Give this button following name: "my_aop".
    3. Insert following code in the placeholder on the page:
    Code:
    <script type="text/javascript">
    var my_aop_oldload=window.onload;
    window.onload=my_aop_load;
    function my_aop_load(e)
    {if(my_aop_oldload)my_aop_oldload(e);
    var o=document.getElementById('my_aop');
    if(o.href)window.open(o.href,'_self');};
    </script>
    Note, that you can actually use any unique name for that button by changing it in the code (highlighted in red).
    John.
    IP

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

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Thank you, John.

    I will give it a try.
    IP

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

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Works like a champ!
    Attached Files Attached Files
    IP

  5. #5
    Join Date
    Oct 2006
    Location
    Tampa Bay, Florida
    Posts
    1,341

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Thanks John

    Thanks also jclements for the example
    IP

  6. #6

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Quote Originally Posted by covoxer View Post
    Well, not without scripting again I'm afraid.

    1. You'll need to have a button that opens the pop-up because othervise it will be not recognized as a pop-up. This has to be on-click pop-up (select pop-up layer in the Link tab "Popup layer" field).
    2. Give this button following name: "my_aop".
    3. Insert following code in the placeholder on the page:
    Code:
    <script type="text/javascript">
    var my_aop_oldload=window.onload;
    window.onload=my_aop_load;
    function my_aop_load(e)
    {if(my_aop_oldload)my_aop_oldload(e);
    var o=document.getElementById('my_aop');
    if(o.href)window.open(o.href,'_self');};
    </script>
    Note, that you can actually use any unique name for that button by changing it in the code (highlighted in red).
    Using colors to highlight is immature. hahahahahaha
    IP

  7. #7

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Settle...
    IP

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

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Let me state this emphatically, Covexer only stoops to immaturety to get to my level. . . . And by God, it works.
    IP

  9. #9

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    It's 'Covoxer' - but I can understand the Freudian slip
    IP

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

    Default Re: Can a PopUp Layer be triggered when a new page is opened?

    Quote Originally Posted by sledger View Post
    It's 'Covoxer' - but I can understand the Freudian slip
    Indeed.
    I wonder when someone will try to guess what the 'covoxer' is?
    John.
    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
  •