Link to home
Start Free TrialLog in
Avatar of Dusty
DustyFlag for United States of America

asked on

Coldfusion - show or hide bootstrap modal

I want to show a "register" modal window on my site after  a certain number of page views lets say 3 page views.

Currently, I have the "register" modal setup to be shown at page load unless the user is loggedin, in which case the modal will not be shown.

What I need help with is how to delay showing the "register" modal until the user has viewed more than 3 pages?

Thanks.
Avatar of gdemaria
gdemaria
Flag of United States of America image

Why not use a session variable to count the page views (only count if the user is not logged in), then when you get to count 3, you can set the display to visible.   In fact, you don't even need the code to be on the page before the third page view... so just include the code on page view 3
Avatar of Dusty

ASKER

Hi gdemaria,

Could you give me a code example to work from?

Thanks for the help!
ASKER CERTIFIED SOLUTION
Avatar of gdemaria
gdemaria
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dusty

ASKER

Thanks gdemaria! that worked out great.