Re: LightBox click detection

From: Date: Sat, 15 Jun 2013 18:23:07 +0000
Subject: Re: LightBox click detection
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-321414@lists.php.net to get a copy of this message
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 <tamouse.lists@gmail.com> wrote: > Tedd Sperling <tedd@sperling.com> 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 >

« previous php.general (#321414) next »