onclick wont fire when using floatbox

Page: 1

Author Post
Member
Registered: Sep 2012
Posts: 2
Hey everyone. I am having trouble with this code:


<a href="https://register.rockthevote.com/?partner=11839&amp;source=embed-rtv180x150v2" ID="LinkButton1" class="floatbox" data-fb-options="width:618 height:max scrolling:yes"
oncclick="_gaq.push([&#039;_trackEvent&#039;, &#039;Rock the vote&#039;, &#039;Click&#039;, &#039;Rock the vote&#039;]) ;LinkButton1_Click"><img src="images/Native Vote.jpg" /></a></p>


The onclick event never fires. The floatbox comes up as expected. When I remove the class="floatbox" it works fine. I dont' know why this is like this. Any ideas?
Administrator
Registered: Aug 2008
Posts: 3382
Having the floatbox class on the link invites Floatbox to assign its own onclick handler to that link. If you wish to have your own click handler fire on that link too, consider adding it as 'onmouseup' or as a DOM2 event such as fb.addEvent( 'LinkButton1', 'click', function() { ... } );

You could also consider adding an afterItemStart callback to that link to run the code once the item is up in a floatbox. See the API Reference for details.
Member
Registered: Sep 2012
Posts: 2
Works like a charm. thanks

Page: 1