-2

I have a popup menu but I don't want it second time when I refresh the page. I try some javascript but I don't get success. if any video/code available please answer me.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Darshan Rathod
  • 591
  • 4
  • 16
  • 2
    Please post any code that is relevant to your question -- it will help posters to better understand the issue and provide compatible answers. – ContinuousLoad Sep 28 '17 at 16:51

2 Answers2

0

You can do something close to what you need by using a Javascript Cookie.

First load : no cookie exist, you set it and display the pop up.

Other load : the cookie exists, you don't display the pop up.

Set a session cookie, so the cookie will be deleted when the browser is closed.

How to use javascript cookie

How to set Session only cookie

Genu
  • 827
  • 6
  • 12
0

The easiest way to do this without using cookies and session is that. You can append a GET variable to the url on page load event. using javascript like www.xyz.com?firstLoad=ture

Using the technique above you can check the variable availability on next time if variable is present you dont open menu , else you open . And on page refresh the variable on url remain Intact.

GeekWithGlasses
  • 572
  • 2
  • 12
  • 30