Results 1 to 2 of 2

Thread: Set Cookie Accept button to stay on current page?

Hybrid View

  1. #1
    Join Date
    Jun 2008

    Set Cookie Accept button to stay on current page?

    Hi guys,

    I know this is probably easier than i think it is. I have a cookie accept button that pops up when new visitors reach my site. However when the 'Accept' button is clicked it links the customer back to the homepage but i would like to keep the customer on the page.

    I guess i just need to know what to replace the <a href="what goes here?"> part.

    <a href="your.domain" class="cookiebuttons" onClick="SetCookie('eucookie','eucookie','time()+31556926')"><strong style="color:#FF9900">Allow Cookies</strong></a>
    Any advice much appreciated.

    Last edited by rodd1000; 07-24-2013 at 06:26 AM.

  2. #2
    Join Date
    Jun 2008
    If anyone else is looking how to make a link to the current page without adding the actual page url (useful with header/footer inlcudes) i have found that adding <a href="?"> or leave the area blank <a href=" "> works great. Knew this was easier than i thought.

Thread Information

Users Browsing this Thread

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

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