View Full Version : Onclick with more than one parameter

09-26-2011, 10:06 AM

I am in doubt if im doing this correct. I have a TD which I have a onclick and a google event tracking code on. But om not shure if I have set it up correct. The () and the , might be wrong..?

<td class="Content_TD" onclick="(window.open('http://www.google.com/')), (_gaq.push(['_trackEvent', 'navigation', 'link', 'event']));">

Thanks in advance!

09-26-2011, 06:22 PM
Try this:

window.open('http://www.google.com/');_gaq.push(['_trackEvent', 'navigation', 'link', 'event']);

09-26-2011, 06:51 PM
you can write your code inside the onclick the same as in the <script></script> (just make sure you have \" for quotes)

Try this:

<td class="Content_TD" onclick="window.open('http://www.google.com/'); _gaq.push(['_trackEvent', 'navigation', 'link', 'event']);">

09-28-2011, 09:22 AM
Thanks to both of you. It works :D

Thank you thank you thank you :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum