Re: [PHP] LightBox click detection

[email protected] (Bastien)
Newsgroups php.general
Message-ID <[email protected]>
Sorry 'bout the top post.

That's how I do it. Capture the click event with jquery and Ajax that back to the server

Bastien Koert

On 2013-06-15, at 2:07 PM, Tamara Temple <[email protected]> wrote:

> Tedd Sperling <[email protected]> wrote:
>> It's Friday so I am allowed to ask odd questions.
> 
> W00T! Friday!
> 
>> Here's the problem --  I need to count the number of times a user activates a LightBox -- how do you do that?
>> 
>> Here's a LightBox Example:
>> 
>>   http://www.webbytedd.com/c2/lightbox/
>> 
>> All the javascript is there (jQuery et al).
>> 
>> Ideally, I would like to have a php/javascript combination that would:
>> 
>> 1. Detect when a user clicked the LightBox;
>> 2. Pass that value to PHP so I can keep count.
>> 
>> Any ideas?
> 
> First off, do you have the javascript code available in an unsquished
> form? That would mean I could read it.
> 
> Not knowing whether your JS code or Lightbox has any hooks that you can
> take advantage of, I'd steal the onclick event from those images that
> start lightbox, fire off an AJAX request and ignore the return, then
> fire the lightbox event handler.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.