Solved

Drop down panel with ajax only first time on load

Posted on 2014-09-27
3
142 Views
Last Modified: 2014-11-05
I want to use ajax to create a panel that will drop down at the top of my web page when it loads the first time but then would not show for subsequent loads.

I want to put up a welcome message for previous users to tell them how to get to old things they may be used to looking for.   But then if you reload the page that panel would not appear. So basically only appear once per session.

I believe it could be done using ajax and the onload command and I could spent some time figuring out how to do it but if someone can give me a few quick insights of where to start my self training or can provide a sample of someplace that does this with jQuery that would be great.

Thanks.
0
Comment
Question by:pkonstan1
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 175 total points
Comment Utility
On first load check for a cookie, if it doesn't exist then show the panel and set a cookie

http://www.w3schools.com/js/js_cookies.asp
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 325 total points
Comment Utility
This article shows the general design pattern.  There is no need to use AJAX, (because AJAX is about seamless client/server communication) but there would be nothing to prevent you from using AJAX.
http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/A_3314-How-to-Show-an-Introductory-Web-Page-Once-Using-PHP.html

The general design pattern for jQuery / AJAX requests is shown here.
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/A_10712-The-Hello-World-Exercise-with-jQuery-and-PHP.html
0
 

Author Closing Comment

by:pkonstan1
Comment Utility
Good answers that provide a good starting point for me to nail this down. Thanks.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now