Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2012
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts

    How can i use an if statement for this

    Hello CF im wondering how could i use an if statement to have something pop up when visitors visit my site that allows them two choices.

    it would say something like this.

    Would you Like to always see the navigation Bar?

    then they have two options. Yes and No.

    then depending on what they choose it will either have the code use the absolute or the fixed positioning attribute for the whole code.

    Or is this just not possible?

    If you want me to explain it more just ask.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It is possible yes. Here are the basic steps you will need to take

    1. Create an HTML/CSS javascript "pop-up". I recommend using jquery.alerts. The updated version is here https://github.com/aurels/jquery.alerts which is modified from the original here http://abeautifulsite.net/blog/2008/...alert-dialogs/
    2. Capture the result from the confirm dialog and then set a CSS value for your menu using javascript.
    3. Save their choice in a javascript cookie.

    Good luck.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jan 2012
    Posts
    53
    Thanks
    0
    Thanked 3 Times in 3 Posts
    alright but could you give me a little tutorial on doing that as ive only been doing sites for about 1 month and haven't really ventured far form html/css stuff.


    the things i need the tutorial on are 2. and 3.


  •  

    Posting Permissions

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