Log In · Register

 
How do you replace links?
meijun
post Mar 10 2005, 12:04 AM
Post #1


Newbie
*

Group: Member
Posts: 9
Joined: Mar 2004
Member No: 9,865



Hi.. I was wondering if there was a code out there that replaced the actual link of some text? .. I was playing around with the replace text code.. and it actually worked in Firefox, but in IE, the replacing didn't work out too well.. ~_~;; ..

.. Does anyone know a code by any chance which would allow me to replace a link? .. I would like to incorporate links into my subscriptions module of people who have non-xanga blogs..

Thanks a lot! I tried searching around the site, but I couldn't find a code for this.. ;_; ..
 
 
Start new topic
Replies
meijun
post Mar 10 2005, 12:15 AM
Post #2


Newbie
*

Group: Member
Posts: 9
Joined: Mar 2004
Member No: 9,865



The code you showed me is the one I used to replace the text of the links, but I was hoping to change the actual URL the text was directing to.. I'm sorry.. I didn't quite understand what you meant with the first code..?

I have tried doing ..

else if (str.match (/name/i)) links[l].innerHTML = str.replace (/name/i, "<a href=blah.com>new name</a>");

.. and the replaced stuff actually worked in Firefox, but it messed up in IE .. x_X; .. help please? =X

Thanks so much for trying ^-^ .. I reallie appreciate it.
 

Posts in this topic


Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: