Summary: Actually it's more than one question, but let me start with this, a page has the following javascript code for inserting a link and in its display section, it used RegExp to show all/any cap {WORD} in navy color.
Status: a) Without the js, the regExp works fine. b) With the js, a long URL insertion would mess up the link, specifically, the <a and /a> would be chopped off, rendering it useless. Comments/lesser question: a) the javascript would only work for IE not FF, was informed that in FF no such thing as createRange(). So, what better option out there for this need? b) source code in question ----------------------- function insert_link(e) { var str = document.selection.createRange().text; document.getElementById(e).focus(); var my_link = prompt("Enter URL:","http://"); if (my_link != null) { var sel = document.selection.createRange(); sel.text = "<a href=\"" + my_link + "\" target=_new>" + str + "</a>"; } return; } <cfset longSTR = "The good news was a strong holiday shopping season that was more robust than in years past as hearty demand for BOOKS, electronics and consumer goods pushed revenue up..."> <!-- have tried another technique, did not improve performance, so, let it go, now fogot, and may be that one would work with the above js? --> <cfloop index=i list="#longSTR#" delimiters=" "> <cfset u = REFind("([A-Z]+[-.]?)+[A-Z]+","#i#","TRUE")> <cfif u gt 0> <b><font color="navy">#i#</font></b> <cfelse> #i# </cfif> </cfloop> Many thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297819 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4