2 Replies Latest reply on Mar 25, 2009 8:33 AM by afamijann

    Using cookie to set selected country across web pages

    afamijann
      Hello,

      I have a request from a client to have country drop down menu of selected countries that would allow anyone choose a preferred country while on the website.

      In reality there is no usefulness of this feature because a fully functional user/member details is implemented and even payment options come up based on selected country in the user/member accounts page but this client insists on this.

      What is the best way of implementing this?

      I have been thinking of form variables or URL variables even though cookies seem to make sense but how to make this variable persist across many pages without altering the page design is what I have not been able to figure out.

      The number of countries is less than 4 for now so pulling the information dynamically from a database or from static options is not an issue.

      Using page includes is there a way to have a selected country remain selected (once selected anyway) using a drop down form regardless of the pages being viewed as long as the drop down menu file is properly included?

      Thanks for any help.
        • 1. Re: Using cookie to set selected country across web pages
          Albert S. Level 3
          Hi Afam,

          ###
          I have been thinking of form variables or URL variables even though cookies seem to make sense but how to make this variable persist across many pages without altering the page design is what I have not been able to figure out.
          ###

          Why would adding a cookie alter the page design? You want to add a cookie but not code in the cookie value into the page? I guess you could include a drop down menu with the value and use a cookie to maintain its value but then you would have to code in the include to the rest of the pages similar to coding in the cookie value into the pages, right? What function would the include drop down menu do beside just show the country you selected and nothing else?
          • 2. Re: Using cookie to set selected country across web pages
            afamijann Level 1
            Hi Albert,

            Thanks for your comment.

            The drop down does nothing but show a default or preferred/selected country chosen by the visitor.

            I am now clear that cookie would work best and that I must include the drop down menu on all the pages.

            Your questions really cleared up a few things I wasn't comfortable with at first.

            Will post an update if I am able to sort this out soon.