Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. star171

    Allow cookies to only be created once user gives authorisation

    Thanks Feherke, Your right, there is no issue with your code, the issue is with the google analytics code. _gat is not defined var pageTracker = _gat._getTracker("**-******-1"); i'm having a look on google if there are any other people experiencing this problem. Once again, thank you.
  2. star171

    Allow cookies to only be created once user gives authorisation

    Thank You so much Feherke. This is brilliant. Just one thing, i don't think the cookies disable function is working as it should, when I click on the link to disable cookies, it doesn't remove the cookies when I go to look at them on firefox. Or alternatively could it be set so that when the...
  3. star171

    Allow cookies to only be created once user gives authorisation

    The page is not on a live site yet, it is only on the development box at work, however i will put the code on the page here for you. currently the page only has a button on it which when clicked creates the cookie. this same button has 2 functions to it's onClick method, first it creates the...
  4. star171

    Allow cookies to only be created once user gives authorisation

    Thanks, I've got it showing on firebug... I've amended that if statement to instead of assignment with the one =, i've changed it to == which is equality check. This has sorted the error in firebug, however it still only sets the one cookie, not my analytics cookies...any suggestions, thanks...
  5. star171

    Allow cookies to only be created once user gives authorisation

    Thanks Feherke I use firebug in firefox sometimes, does this have the error in it?... As im not familiar at all with javascript, im not reallys sure where i need to be looking either to rectify the error..
  6. star171

    Allow cookies to only be created once user gives authorisation

    Just struggling with the cookieExists function I have which checks if a cookie exists then allows the analytics cookies to be set, would someone please have a look and let me know what i am going wrong?...my cookie nama is websitecookie <script type="text/javascript"> function...
  7. star171

    Allow cookies to only be created once user gives authorisation

    I think it can also be set in the onClick in the button to determine the order of the functions to execute. Is the code i have put ok for checking if the cookie exists and if it does then allow the analytics cookies?
  8. star171

    Allow cookies to only be created once user gives authorisation

    Thanks guys, What the ICO have done is similar to what I am trying as well. I can get the cookie created, that fine. However what I want help on if possible is in my function cookieExists, in this function I want to check that the cookie named "websitecookie" exists and if it does, then I...
  9. star171

    Allow cookies to only be created once user gives authorisation

    Thanks Vacunita, I've sorted the cookie set function. Once the cookie has been created, how can i get it to automatically call my function to check if the cookie has been set and if it has, in the process allow the google analytics cookies to be set? The code i have for this is: function...
  10. star171

    Allow cookies to only be created once user gives authorisation

    Thanks for your help vacunita, name = websitecookie; value = cookiecreated; I thought i defined the variable in the: function Set_Cookie( name, value, expires, path, domain, secure ) Can you please advise how to sort this please?
  11. star171

    Allow cookies to only be created once user gives authorisation

    changed it to below but still not getting the cookie set: function Set_Cookie( name, value, expires, path, domain, secure ) { name = websitecookie; value = cookiecreated; // set time, it's in milliseconds var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires =...
  12. star171

    Allow cookies to only be created once user gives authorisation

    Do you mean a popup prattarratt? Can anyone have a look at my javascript code, to check if it is on the right lines? thank you.
  13. star171

    Allow cookies to only be created once user gives authorisation

    Thanks Prattaratt, The website i work with has thousands of pages so the option of another website which is cookie free would not be an option for us, however yes that still leaves the question of what to do with the people who say no to cookies... As for the law, I don't think it relates to...
  14. star171

    Allow cookies to only be created once user gives authorisation

    Can i just run my code past you please, to check if I'm on the right track as javascript is not really my strong point. <input type="checkbox" onclick="Set_Cookie()"> Header code to create the cookie: <script type="text/javascript"> Set_Cookie( 'websitecookie', 'cookiecreated', 730, '/', ''...
  15. star171

    Allow cookies to only be created once user gives authorisation

    Thanks vacunita, I will work with your solution. Good question NESWalt, from all the current guidelines out there it seems if the user decides not to have cookies, they will end up getting a website that does not function well at all, the lawmakers do not seem to be too concerned about that.
  16. star171

    Allow cookies to only be created once user gives authorisation

    Ideally we wouldn't want the visitor to disagree. But if they disagree, then I don't want any cookies to be created. The cookie value if accepted will be accepted and if not it will be declined, if that is possible.
  17. star171

    Allow cookies to only be created once user gives authorisation

    Thanks NESWalt, This is not allowed for European sites under the new laws which will be coming into force. New laws make it compulsary for you to get the users consent, and until you don't get their consent you cannot place any cookies on this machine. This is the reason why I want to have...
  18. star171

    Allow cookies to only be created once user gives authorisation

    Hello, I am wanting to have a prompt on my webpage load that asks the user if they allow the use of cookies, this is in line with new european directives that are due to come into force. Once I get the user permission that is when I want the cookie to be set. I have the code to create the...

Part and Inventory Search

Back
Top