Its only for links imbedded in content. the content is editable by the site 
admins and once the initial script is run the admins what the ability to edit 
the logme codes. I modified FCKEdit to allow me to edit the codes but I need to 
write a script to seed the content

Duane

-----Original Message-----
From: Barney Boisvert [mailto:bboisv...@gmail.com] 
Sent: Thursday, July 23, 2009 6:14 PM
To: cf-talk
Subject: Re: RegEx Help


How about load jquery and do

jQuery("a").click(function() {
  logme(jQuery(this).attr("href"));
});

On Thu, Jul 23, 2009 at 2:04 PM, Duane Boudreau<du...@sandybay.com> wrote:
>
> I need a little quick (hopefully) regex help.
>
> I have to modify all the links on a site that do not contain onclick events
>
> Here is the regex and sample code I have:
>
> <cfsavecontent variable="myContent">
> <a href="/downloads/abc.pdf">Click here for File</a><br/>
> <a href="/files/xyz.xls" onclick="logme('/files/xyz.xls');">Click here for 
> File</a>
> </cfsavecontent>
>
> ReReplaceNoCase(myContent, "(<a href="")(.*?) ("">)(.*?)(</a>)", "\1\2"" 
> onclick=""logme('\2')\3\4\5", "all")
>
> this works fine as long as the link doesn't already have an onclick event in 
> it.
>
> Any ideas what I need to change?
>
> TIA,
> Duane
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324906
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to