Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    May 2013
    Location
    KZN, South Africa
    Posts
    20

    Default Automatically load popup layer for set amount of time

    Good day ladies, gentlemen and all custodians of this amazing forum!

    Today, I find myself in need of some advice.
    I am looking for a way to have a popup layer load on page load, but then I want it to automatically close after a set amount of time, say 8 seconds. The automatically load on page load, I got down already, it's the rest of the process that I want to know:

    1. Can it be done?
    2. How?

    I know that most of you are going to reorganise my priority list to start with "WHY?", so I will furnish you with that answer, before it even gets asked.
    A: F*** knows why my client wants this.

    Thank you so much guys for having this amazing forum full of amazing people. Looking forward to your answers.

  2. #2
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,503

    Default Re: Automatically load popup layer for set amount of time

    I am sure there is a script for this and I think this request has come up before. Acorn can probably help out here.

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Default Re: Automatically load popup layer for set amount of time

    Quote Originally Posted by Frodo View Post
    I am looking for a way to have a popup layer load on page load, but then I want it to automatically close after a set amount of time, say 8 seconds. The automatically load on page load, I got down already, it's the rest of the process that I want to know:
    1. Can it be done?
    2. How?
    Frodo, yes it can.
    How depends on what you have used to display the pop-up on load. can you advise or provide a sample?

    Basically, it would be a Windows timer that firs up the Close button action.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #4
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: Automatically load popup layer for set amount of time

    You could use an approach that has the 'popup' fade in on-load and fade-out after a time interval : https://initiostar.co.uk/demo/JSPop/

    I can think of many examples where this approach is quite useful for short-timespan visitor messages (e.g. in a restaurant where you might want to say new menu tonight).

    It does require a few lines of code, but maybe worth a thought.

    Gary

  5. #5
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Info Re: Automatically load popup layer for set amount of time

    @gary - the javascript: in your code is not needed; you are between script tags.

    My approach is just CSS - no jQuery so a quicker and smaller payload.
    All elements on the page/layer that need to fade away are Named: htmlclass="popupAndFade"

    I add my CSS to the Website Code (head):

    <style>
    .popupAndFade {
    animation: fadeAnimation ease 10s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    }


    @keyframes fadeAnimation {
    0% {
    opacity: 0;
    }
    10% {
    opacity: 1;
    }
    90% {
    opacity: 1;
    }
    100% {
    opacity: 0;
    }
    }
    </style>

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  6. #6
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    41,503

    Default Re: Automatically load popup layer for set amount of time

    Brilliant.

  7. #7
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: Automatically load popup layer for set amount of time

    @Acorn - great solution; stored away for future use.

    Gary

  8. #8
    Join Date
    Mar 2009
    Posts
    4,503

    Default Re: Automatically load popup layer for set amount of time

    Nice one, Acorn. Thanks!

  9. #9
    Join Date
    Oct 2006
    Location
    StPeters, MO USA
    Posts
    10,819

    Default Re: Automatically load popup layer for set amount of time

    Thank you Acorn.
    Larry a.k.a wizard509

    Never give up. You will never fail, but you may find a lot of ways that don't work.

  10. #10
    Join Date
    May 2013
    Location
    KZN, South Africa
    Posts
    20

    Default Re: Automatically load popup layer for set amount of time

    Hey guys,

    I just popped on quick and I see there are some brilliant responses here. Thank you so much, as soon as I have a gap later today I will go through and try these out.

    To answer your question Acorn, it's the method that GWPriester layed out before I think. I'll double check and let you know.

    Thanks so much guys, you are the best!
    Last edited by Frodo; 19 May 2021 at 07:54 AM. Reason: incorrect information

 

 

Tags for this Thread

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
  •