Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2018
    Location
    Italia
    Posts
    24

    Default Insert a warning image (or text) to close before starting

    Hello.
    web design 17

    On the index page of my example site (the first page) I have to insert a warning image (or text) to close before starting, such as happens with the acceptance of cookies.
    The message must appear only once when opening the site.
    After clicking on the message, the site must be opened and then by pressing the back button of the browser the message must not appear.
    Anyone have a solution?

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,805

    Info Re: Insert a warning image (or text) to close before starting

    It is not a thing you can do natively in an XDA as Xara designs deliver static code.

    In the day, you would set up a Cookie.

    The new approach is more graceful.
    Run this and Preview in a real browser (not Xara's Preview if using an XDA before v17).

    JS - Local Session Storage One-off Banner.xar

    The first time you view this you will se a stretch image, a block of text, a box and a close button.
    Click the button ot just close the browser.
    Rerun or press F5 in the browser and all are gone until you press the RESET button.
    If you keep pressing F5 you will get one-off view only unill REST is pressed again.

    In the browser's Developer Tools (F12) > Application > Local Storage, you will see a section for your URL with a Key of message and a value of seen after opening the page.
    This is only removed with an explicit delete action, like the click of the RESET button.
    It will remain in the viewer's browser indefinitely otherwise.

    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

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

    Default Re: Insert a warning image (or text) to close before starting

    Small change to the X close: javascript: localStorage.setItem("message", "seen"); void $('.banner').hide('slow'); to make it work in FireFox (and still OK elsewhere).
    Equally, you can add a Show button to pop-up the Banner: javascript: void $('.banner').show('slow');

    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
    Oct 2018
    Location
    Italia
    Posts
    24

    Default Re: Insert a warning image (or text) to close before starting

    Thanks Acorn. I published a page on http://opencreative.it following your instructions. everything works. thank you!

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

    Default Re: Insert a warning image (or text) to close before starting

    Quote Originally Posted by megapixel51 View Post
    Thanks Acorn. I published a page on http://opencreative.it following your instructions. everything works. thank you!
    Great to see it works for you.

    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

 

 

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
  •