www.webdeveloper.com
Results 1 to 7 of 7

Thread: Help! OnLoad once Get Cookie/Close Browser or Tab Delete Cookies

  1. #1
    Join Date
    May 2010
    Posts
    10

    Lightbulb Help! OnLoad once Get Cookie/Close Browser or Tab Delete Cookies

    Help me!, I'm using Slimbox2.js and call this script everytime when someone visit my website (Homepage only):

    Code:
    <script language='javascript' type='text/javascript'>
            (function($)
          {
             $(document).ready(function()
             {
                jQuery.slimbox(&quot;http://u.kaskus.us/4/bgciomqt.png&quot;, &quot;Welcome to cststudio website!&quot;);
             });
          }(jQuery)); 
       </script>
    Now what i want to do is,
    How do i get this script to be called just once time?

    I think GET COOKIES will work, but i'm newbie on javascript.

    Here the explanation:
    1. Someone visit my website (ex: http://blablabla.com/), and navigate to (ex: http://blablabla.com/how-to-do.html)
    2. When the user get back to (http://blablabla.com/) the user wont get this slimbox appear
    3. It will appear only if the user close the browser tab/window, and open the website again. (OR whatever script to get cookies and delete it when the user time has expire)

    I would appreciate if somebody help me to solve this problem.

  2. #2
    Join Date
    May 2010
    Posts
    10
    What i wanted here is

    Here the algorithm:
    If check.Cookies = 1 then do nothing else write.Cookies that can be expired or auto delete when visitor close the tab/window browsers +

    Code:
    <script language='javascript' type='text/javascript'>
            (function($)
          {
             $(document).ready(function()
             {
                jQuery.slimbox(&quot;http://u.kaskus.us/4/bgciomqt.png&quot;, &quot;Welcome to cststudio website!&quot;);
             });
          }(jQuery)); 
       </script>
    Hope somebody would translate this algorithm into javascript.

  3. #3
    Join Date
    May 2010
    Posts
    10
    Can someone help me solve this script?

  4. #4
    Join Date
    May 2010
    Posts
    10
    Really need this script, help me please

  5. #5
    Join Date
    May 2010
    Posts
    10
    Help me

  6. #6
    Join Date
    May 2010
    Posts
    10
    Help me as soon as possible

  7. #7
    Join Date
    Jan 2009
    Posts
    3,346

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles