-
Javascript to search and replace HREF=
All,
Is there a way to use Javascript to search and replace all link in the body with a new value? My search engine generates links with Mapped drive which causes problems with Firefox and Netscape (works fine with IE).
For example, on each of the search result, the link HREF="C:\Test\test\test.html" should be replaced with HREF="http://www.abc.com/test/test.html" ???.
Since these search result are dynamic, maybe I could use Onload on the body and searc&replace all of the HREF="C:\Test\test\ with HREF="http://www.abc.com/test All links start with HREF="C:\Test\test\
Is this possible? If it is, sample code, please.
Thank you.
Chris
-
-
There isn't a way that I know of to do this, as I don't think Javascript has the capability to parse HTML.
Use notepad on your HTML file to replace c:\test\test with www.yourhost.com/ if need be. Which HTML generator are you using?
cr3ative
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks