HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

replace Hyper links.
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> General HTML
View previous topic :: View next topic  
Author Message
Zaphieon



Joined: 13 Oct 2009
Posts: 8

Posted: Mon Oct 26, 2009 7:54 pm     replace Hyper links.  

ok heres what i want to do..

if the hyperlink does not have http:// in front of it I want to add http://www.mydomain.com to it for every hyperlink on the page automatically.
sticks464



Joined: 31 Dec 2006
Posts: 2311

Posted: Mon Oct 26, 2009 8:45 pm      

Here's how you do it with css;

The css
Code: a:before {
   content: "http://www.mydomain.com/";
}

The html
Code: <a href="#link">my link</a>
<a href="#link2">my link2</a>
<a href="#link3">my link3</a>

Makes an absolute link visible in the browser but does not insert any code into the html.
Zaphieon



Joined: 13 Oct 2009
Posts: 8

Posted: Mon Oct 26, 2009 8:57 pm      

that didn't work at all.. added the URL all over the site though lol

http://www.remax-inmotion.com/index2.php
Zaphieon



Joined: 13 Oct 2009
Posts: 8

Posted: Mon Oct 26, 2009 9:19 pm      

basically I need to add my domain name after each

src="
url="
href="

.....

so a link that looks like this

a href="images/pizza.jpg"
will come out like this
a href="www.mydomain.com/images/pizza.jpg"
sticks464



Joined: 31 Dec 2006
Posts: 2311

Posted: Tue Oct 27, 2009 3:55 am      

Limber up your fingers because you'll have to manually type all of them. TMK there is no script that adds content to the html automatically. Scripts are for dynamic presentation not markup.
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> General HTML
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group