Forum Moderators: open

Message Too Old, No Replies

combine two onclick events?

         

tonynoriega

8:43 pm on Nov 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have a link that uses:

onclick="opener.location=this.href; self.close();"

which i also want to incorporate some google analytic code:

onClick="javascript: pageTracker._trackPageview('/downloads/map'); ">

can i incorporate both of these in one onclick event?

astupidname

12:40 am on Nov 7, 2008 (gmt 0)

10+ Year Member



Should be able to. One thing, in the onclick you never need to declare "javascript: whatever()" as javascript is already implied by the onclick itself. So you might try it like this:
onclick="opener.location=this.href; pageTracker._trackPageview('/downloads/map'); self.close();"