Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    May 2011
    Location
    Pennsylvania
    Posts
    66

    Default One Time Photo Drop-Down

    I'd like to have a photo drop-down from the top of my main page and stop at approximately the middle of the web page. The user could then get rid of the image by clicking on an X in the top-right corner of the photo. The photo WOULD NOT drop down again on subsequent reloads of the main page.

    Below is a simplified illustration of what I'd like to do.

    Click image for larger version. 

Name:	photo_drop-down.jpg 
Views:	130 
Size:	38.2 KB 
ID:	111106


    Thanks for your help.


    Kevin

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

    Default Re: One Time Photo Drop-Down

    There must be a code that could do this (which is why I am sure you asked).

    You could accomplish this in Web Designer 11 Premium or Designer Pro X11 using an animation limited to one time. The photo could fade to white or have a white rectangle slide in front of it.

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

    Default Re: One Time Photo Drop-Down

    The short answer is no.

    The long answer is no as Xara web sites do not store any history or session data; they are stateless.
    A browser refresh would restart the experience.
    You could create a Cookie for this provided the end-user allowed Cookies (and JavaScript).

    The Xara way might be to land once on the page and for all links to it thereafter actually point to a sister page that doesn't have the photo drop.
    The use of the back key and a revisit to the original page would start it all over but for that sessionand all internal links the page is never revisited.

    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 2015
    Location
    Germany
    Posts
    927

    Default Re: One Time Photo Drop-Down

    As Acorn said this will not work if the user disabled cookies, but you may have a look here: http://oerel.goip.de/onetimepopup
    It uses sessionStorage. If you replace it with localStorage you can remember the visit even if the browser is closed and reopened.
    The example was taken from another tread so it will display a form after 5 seconds. You can place whatever you want on the pop-up layer.
    Attached Files Attached Files

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

    Default Re: One Time Photo Drop-Down

    Quote Originally Posted by siran View Post
    As Acorn said this will not work if the user disabled cookies, but you may have a look here: http://oerel.goip.de/onetimepopup
    It uses sessionStorage. If you replace it with localStorage you can remember the visit even if the browser is closed and reopened.
    The example was taken from another tread so it will display a form after 5 seconds. You can place whatever you want on the pop-up layer.
    Cheers siran, are you saying in the Page's Head, you simply change:

    if (!sessionStorage.getItem("popupAlreadyOpened")) {
    setTimeout(popupopen,5000);
    sessionStorage.setItem("popupAlreadyOpened",true);
    to
    if (!localStorage.getItem("popupAlreadyOpened")) {
    setTimeout(popupopen,5000);
    localStorage.setItem("popupAlreadyOpened",true);
    I've tried it and it seems to work a charm.

    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
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: One Time Photo Drop-Down

    Even if cookies are disabled? I tried in Firefox and it didn't work there.

  7. #7
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,918

    Default Re: One Time Photo Drop-Down

    Worked fine for me in FF siran.

    Sweet solution and thanks, I've managed to get a page to do exactly as Kevin required thanks for your code.

    My coding is rubbish. One thing I can't understand though:

    // now call the function that opens the pop-up after a delay of 1000 milliseconds (in this example).
    // you can change the value to anything you want. i would recomment 7200000 (which is 2 hours). this actually was the reason i was unhappy with eggs solution. ;-)
    // added check for already opened pop-up
    Surely, all that changing the timing to 2 hours will mean, is that the pop-up won't display for 2 hours? (never in reality as the visitors not going to hang around that long!)

    Local or Session storage don't use cookies?
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  8. #8
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,918

    Default Re: One Time Photo Drop-Down

    Here's an example of the session option. It will show the pop-up after closing & reopening the page / tab / browser:

    Here's an example of the local option. It will NOT show the pop-up after closing & reopening the page/ tab / browser. In fact it never will again unless some value is passed:

    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  9. #9
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    927

    Default Re: One Time Photo Drop-Down

    Yes Egg, that was a joke. Just wanted to say that I don't like those pop-up things that have to be clicked away. And your solution in the other thread only allowed for 10 seconds.
    It still will not work in FF for me when cookies are disabled. Strange, maybe some other setting is also involved here?

  10. #10
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,918

    Default Re: One Time Photo Drop-Down

    I don't like them either siran, they're a pita!

    Cookies shouldn't be required, see:

    http://www.w3schools.com/html/html5_webstorage.asp
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

 

 

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
  •