Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Drop down panel with ajax only first time on load

Posted on 2014-09-27
3
158 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 109

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

828 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