?
Solved

Drop down panel with ajax only first time on load

Posted on 2014-09-27
3
Medium Priority
?
177 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
[X]
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
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 700 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1300 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

770 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