Help with getting href values of a list of <a> tags returned by ColdFusion via AJaX
Hello, all,
I'm working on a project whereby we can run a script that will check all the links of a generated page to make sure that each link (local and off-site) are valid.
As of now, and I can be open to change, I'm using AJaX to call a CFC function that uses CFDIRECTORY to recursively get all .cfm and .htm pages of a site, swap out the physical drive path for each entry with its FQDN address, loops through that using CFHTTP to parse the page, then uses REMatch to get an array of all anchor tags in the page. I am currently looping through the arrays and adding the values as KEY to a struct to eliminate duplicates, then CFRETURN the ArrayToList(StructKeyArray(array),"|"). CF is returning something like:
<a href="https://www.domain.com/index.cfm">Link One</a>|<a id="newlink" href="https://www.google.com">Link Two</a>|<a alt="test" id="testing" href="https://www.another.com/index.asp">Link Three</a>
So how can I get just the value of the href attributes??
V/r,
^ _ ^
