broadbeach_media — 2011-08-18T19:52:02-04:00 — #1
Hi all we are in desperate need of a solution, we have tried and search different methods but none of us can figure it out.
Basically we need to find a word which is inside a class and display a link.
So something like this
find a word equal to "1 line custom"
display this <a href="/1-line-custom.htm">click here</a>
I'm not sure if this is really simple or not.
Any help would be much appreciated.
broadbeach_media — 2011-08-18T20:35:10-04:00 — #2
Ok so we are getting close, basically what this is doing now is finding the words inside a class then showing us them in an alert.
<td><div class="productitemcell">Champagne Weadding</div></td>
<td><div class="productitemcell">1 line custom</div></td>
var divArray = document.getElementsByClassName("productitemcell");
for (var i = 0; i<divArray.length; i++)
But this is obviously not the final result we are after.
We need to be able to find the words "1 line custom" in the background (so the user dosnt see this happening) then once these words are found display a link.
Let me know if this is making any sense to you.
paul_wilkins — 2011-08-19T04:09:04-04:00 — #3
You want to find text and change that text to a link, so if the text was spider on a page called "fear of spiders" you would change the word "spider" to a link advertising spider cages?