Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter pidginbil

    (@pidginbil)

    Thanks Kevin … I’m a little bit outside my comfort zone with JavaScript, so please help me out a bit if you can.

    button field ID: 9
    Using Inspect element, the Button HTML is:

    <input id=”ninja_submit” name=”ninja_submit” type=”submit” value=” Submit ” class=” “>

    the JavaScript I’d like to call is for google analytics:

    onsubmit=”pageTracker._trackPageview(‘/pagename’); return false;”

    Where pageTracker._trackPageview is defined elsewhere on the page:

    <script type=”text/javascript”>
    var pageTracker = _gat._getTracker(“UA-######-#”);
    pageTracker._initData();
    pageTracker._trackPageview();
    </script>

    I do know how to add a javascript snippet to a wordpress page. What this untrained noob don’t understand is how to wrap the onsubmit event in a way that ties it to the button ID.

    Thanks

    BILL

Viewing 1 replies (of 1 total)