Forum Moderators: open

Message Too Old, No Replies

Dinamic Find and replace character using DOM

Find and replace character using DOM, DOM and JAVASCRIPT, DOM AND CSS

         

sugar2

4:48 pm on May 14, 2005 (gmt 0)

10+ Year Member



(when you cant edit the source of the search results page, yahoo store webmasters knows what im talking)

at thew moment of posting this new topic the search menu was disabled...

hi, look at this page: [search.store.yahoo.com...]

it have nonhtml characters (like \ñ) and then cant be displayed, and as you can see, its a search results page...

in other words: a DOM way to dinamically find and replace the current "ñ" and replace they with a new "ñ".
and i ask for a DOM solution or starting point its because i cant edit the source of that page, and i cant edit the original html in wich contains the "ñ" character either.

do you have an idea about howto "Find and replace character using DOM?"

thanks

sugar2

5:33 pm on May 14, 2005 (gmt 0)

10+ Year Member



this is a pseudocode for the solution im asking for: (and i said pseudocode because i donnt know if we have a getElementsByText or a document.createText, im just Speculating:
i dont know is it can be doable... please giveme ideas or please helpme making that code doable and actually working

function changeLatinN(){
if(!document.getElementsByText) return;
var d, h=document.getElementsByText('ñ');
while(h.length){
(d=document.createText('ñ'));
h[0].parentNode.replaceChild(d,h[0]);
}
}

thanks