I have a web page with a jQuery lightbox that opens automatically on page load. In the lightbox I have implemented the Facebook Like button (this is a 2 click solution for Facebook Like button in email). Now, when a Facebook user visits my web page by clicking on the "Liked" URL on Facebook I want to turn off the lightbox. I don't want to have to create two different pages (one with lightbox turned on and another turned off) and I think I can avoid this by adding a parameter to the URL with Javascript then turn the lightbox on/off based on that parameter. Is this a safe way to do this? How would I do this?
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
You can get URL params with this JS function that I found here:
Then *add use
*to add parameters you can either:
|
|||||||||||||||||||||
|
I believe this is the rough code you're after:
Then on index.php, you'd want something such as:
Example:
Hope this was helpful! Source: http://php.net/manual/en/function.isset.php & W3School's tutorials on PHP |
|||||||||||||
|