140
rated 0 times
[
141]
[
1]
/ answers: 1 / hits: 51443
/ 13 Years ago, tue, july 5, 2011, 12:00:00
I have been going round and round trying to find a definitive answer. Basically, I want to add the Google Analytics event tracking to a form submit - I was hoping to add an onClick to it, but I am having a tough time finding out if all the browsers support it.
I asked the person who designed the form, and she said that the reason they didn't use the button type is that is caused issues submitting the form in some browsers, but could not remember which ones.
So, will it work across browsers, or should I switch to button?
Relevant code below:
<input name=submit id=submitme type=image
src=/graphics/creative/landing_pages/popup/ibd_signmeupbtn.gif
alt=Sign Me Up!
onClick=_gaq.push(['_trackEvent', 'Registrations', 'Register', 'Lightbox']);
tabindex=8 />
EDIT I have _gaq defined. The real goal of this question is to make sure that using an onClick with an input image is OK to do.
More From » html