Microsoft
Software
Hardware
Network
Question : How do I perform linkification on a traverse of a DOM dynamically
Hello,
I am traversing the DOM and am extracting every text object. What I would like to do is, run the nodeValue of the text object against a regular expression preferrably using the replace function and replace the content. When it finds a match, it should replace the matched word with <a> linkified version of it. So basically I want to linkify certain words in the DOM if they exist.
To replace it using innerHTML is not working because if I have a text object only in the body tags it will want to replace the entire body, I have also heard that innerHTML isn't favored upon. So for example if i did currentNode.parentNode.inn
erHTML = something; something will be the entire body if the text object is right after the body tag.
Using replaceCHild will replace the nodeValue text but not with the link as html, it appears as text and again I'm in the same situation.
How can I insert my linkified word into the node as a link dynamically??
Oh yes, no jQuery please. Thats very important.
Answer : How do I perform linkification on a traverse of a DOM dynamically
Do not need support anymore.... Time has passed,
Random Solutions
use wireshark to capture whats happening during the logon process
Gridview Update not saving. Fields stay in edit mode.
Avast home edition
Need Excel User Function to Convert Tuesday, June 08, 2010 3:16 PM to mm/dd/yy
Having a problem json encoding a string with quotes
storing multiple image in one field
Deploying iTunes 9.2 using SCCM and CMD file?
Count consecutive values in MS SQL Server 2005
How do i factory reset netvanta 1524st switch from the cli command line?
Cisco ASA SIte to Site NAT Options.