Re: [Hypercontent-users] onClick events on Anchors
Brought to you by:
alexvigdor
From: Alex V. <al...@bi...> - 2007-08-14 23:17:09
|
Hey Scott, HC is hard-coded to strip out javascript event handlers from WYSIWYG areas . . . this has come up before and it would definitely be good to break that configuration out from the code, but for the moment a couple workarounds would be 1) create a separate XML element in your DTD not called "html" that can go in a page (e.g. "rawhtml"). You can put input your link as plain character data, and add output support in the XSL (which I'd be happy to help with). You could then mix the elements in your page (html, rawhtml, html, etc.) 2) set up the onclick handler in XSL (works well if it's for a navigation link or other auto-generated link) 3) as you suggest, do some javascript trickery to set it on the client side. Longer term, I would love to bring over some code I wrote earlier this year for ABC that makes it easy to work with any number of element/attribute cleanup configurations. Have to check with the boss on that first though! Alex On Aug 14, 2007, at 10:43 AM, Scott Battaglia wrote: > Alex, > > I've set up some Google Analytics goals and I want to track them > from my > web page (i.e. how many people download file X). Google Analytics > does > this by placing an onclick event on the anchor. I've added the > onclick > event but whenever I save the page it removes the onclick event. > > Is there a way to make this possible? Or do I need to use some > JavaScript trickery to set the onclick event via code. > > Thanks > -Scott > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Hypercontent-users mailing list > Hyp...@li... > https://lists.sourceforge.net/lists/listinfo/hypercontent-users > |