Solved

Drop down panel with ajax only first time on load

Posted on 2014-09-27
3
148 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
ID: 40347738
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
ID: 40347772
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
ID: 40424836
Good answers that provide a good starting point for me to nail this down. Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

912 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

23 Experts available now in Live!

Get 1:1 Help Now