Click here to Skip to main content
15,903,201 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I want to pop up a welcome screen when any visitor opens my website for the first time.

I've four pages (home, tutorials, events, books)in my website. The visitor should get the welcome pop up window, when he visits any of the page for the first time. After he visits any of the page, he should not get the welcome screen again when navigating to other pages.

Again when the visitor re-visits the website, the process should repeat.

Now my queries are:
1.How to do build such pop up window?

2.Can I do it with javascript? but what if javascript is disabled, what are the other ways to do this like ASP.NET?

3.Can I make such choice that the pop up window be shown via javascript but if javascript is disabled pop up window should be shown with the other way????
Posted

IMO I wouldn't worry about JavaScript being disabled. Every modern browser has it and 99.9% of user expect the highly interactive features that come from using it. Redirect the users who don't to a message page explaining how to turn it on and the benefits they are missing out on.

Use a session variable to set a flag whether the user is on the first visit and display the popup accordingly. You can create a JavaScript method that displays the popup and call it using RegisterStartupScript as necessary.
 
Share this answer
 
Comments
nischalinn 25-Dec-11 8:14am    
Can I have the code for guidelines?
Tech Code Freak 25-Dec-11 23:27pm    
5up!
Not exactly what you want, but This[^] may help.

Click a button on the pop-up and make sure it is not called again.
 
Share this answer
 
hi frnd,

there is a multiple way of doing this functionality.

1) first you will create a cookie on the visitor machine if visitor visit website first time . then when he open next time you can read the cookie if not exist then you will show the popup using j-query or JavaScript .

2) you can trace the ip address of the request .you can get the IP address and store into the database and if requested IP address not found into database then you can show the popup using j-Query or java script.

For popup window you can use Gray-box( you can find from the Google) or any other JavaScript model popup windows.

Let Me know if this tip will helpful to you.
 
Share this answer
 
Comments
nischalinn 26-Dec-11 11:03am    
thanks for the solution. I'll implement the solution you referred.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900