• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How best to Display an optional modal page

#1
I have the case where I want to display a 'first time' page probably based upon a cookie. EG Open site, if cookie not set, display 'welcome' page with additional info on it (ideally centered in the viewport of the main page and again ideally, change the opacity of the main page) then set the cookie with expiry date of (say) 21 days. The idea is that for frequent visitors, they don't get bombarded with intro page. Ideally, force the user to close the intro page before continuing in the site proper. If cookie is set, just display normal first page.
I have tried <body onLoad="popup('http://www.xxxx.com/yyy/introduction', 'ad')"> which works but it appears to be reloading continuously (evidenced by adding an alert into the introduction form) so what I see is form load, alert, flicker (form load?) alert, flicker etc.
So my question is what is the best practice to achieve my goal? I could avoid the form load and just include a div in the main form and make it visible or not depending on the cookie but that seems to be avoiding the issue.
I have not yet included the cookie test and I assume that if I did, the problem would not be visible but it does not fix the real issue of why it seems to reload. I don't know if there is a codeigniter way to do this or even if it is related to codeigniter.
Cheers
Geoff
Reply

#2
Not to be confused with 'Model'... Sounds good to me.. pretty straight forward to do stuff based off of cookie info. Did you try it? bootstrap has a pretty good Model that can be enacted easily.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.