Welcome to WebmasterWorld Guest from 54.159.101.208

Forum Moderators: not2easy

Message Too Old, No Replies

Can you embed a hyperlink into a web graphic?

Can you embed a hyperlink in a graphic?

     
2:13 am on Jun 24, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 8, 2005
posts:82
votes: 0


Can you embed a hyperlink into a graphic, to make it a live link?
so the graphic has the link and its not built in the html or anything........so its just in the graphic file its self .jpg .png or .gif file.

If it can be done, how?

2:50 am on June 24, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:July 8, 2004
posts:175
votes: 0


hmmm...if you mean making the image a hyperlinked object using simple html code, yes. i.e.:

<a href="linkedpage.html"><img src="images/picture.jpg"></a>

That will cause the rollover the image to be a live link, that when clicked, goes to the lianked page.

If you're talking about something other than that, I have no idea.

good luck!

3:53 am on June 24, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 8, 2005
posts:82
votes: 0


what Id like to do is place lets say a graphic ad lets say ad1.png on 100 pages without having to change it on 100 pages just upload a new ad.....
or graphic.
is there a way to do this?
3:56 am on June 24, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 8, 2005
posts:82
votes: 0


so each time I change the ad I dont have to go into a 100 pages....is there a way to do this?
I know google makes it easy for us....but Id like to do some independent ads ones I choose.
6:45 am on June 24, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 8, 2005
posts:82
votes: 0


is this somthing that is even possible?
7:04 am on June 24, 2006 (gmt 0)

Preferred Member from ES 

10+ Year Member

joined:Nov 13, 2005
posts:646
votes: 0


You don't need an image embedded in a link but a Search&Replace utility to quickly change text in hundreds of pages. Google it; there is a lot of free apps.
7:44 am on June 24, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 15, 2003
posts:7242
votes: 0


If you have php on your server (or any kind of service side scripting for that matter):-

<?php include('myad.php');?>

..... in the body of the page where you want the ad to go, instead of the IMG HTML code, then create a new file, myad.php, and put the HTML code in there.

When you need to change the ad, you just change the code in the myad.php file and job done.

If you don't have any kind of server-side scripting available, you can do this client-side with javascript by putting:-

<script type="javascript" src="myad.js"></script>

.... in the body of the page where the ad is to go, then create a new file on the server called myad.js and put this in it:-

document.write('<a href=""><img src="image.jpg></a>');

All above code off the top of my head and may need cleaning up and syntax checked etc.

TJ

3:39 pm on June 24, 2006 (gmt 0)

Moderator from US 

WebmasterWorld Administrator travelin_cat is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 28, 2004
posts:3141
votes: 2


Why would you not create a new graphic and just call it the same as the old one? If you have 1.png, archive it as 1_1.png. Then make a new graphic and call it 1.png and drop it on to the server in the same location. Now all references to 1.png will not have to be changed and the new graphic will show up.

If you want to go back to the first graphic, archive the second calling it 1_2.png and change 1_1.png back to 1.png ad finitum.

3:48 pm on June 24, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:May 24, 2005
posts:554
votes: 0


I believe he wants to also change the link as well so just changing a graphic makes no difference..

an include file in php seems like a decent option..

find and replace in dreamweaver also works..

Flash would do it..

seems to me CSS should be able to cope with that also but never tried it..

Just top of my head stuff, I'd probibly go for an include..

5:29 pm on June 24, 2006 (gmt 0)

New User

10+ Year Member

joined:Apr 13, 2006
posts:8
votes: 0


Regarding ad management, try searching the web for terms php & adserver - there should be a open-source ad server packages ready for installing.
10:10 pm on June 28, 2006 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts:4393
votes: 2


If you are not a coder
do a Google for SSI (Server Side Include)
but your pages will need to get a new extension
instead of HTML it will be SHTML

As such you will need to also to do a whole bunch of redirect to make sure that your HTML_OLD will point to the new one.

4:05 pm on July 1, 2006 (gmt 0)

New User

5+ Year Member

joined:July 1, 2006
posts:3
votes: 0


Hi, you can NOT embed a hyper link into the binary data of a graphic such as jpg, bmp and gif.

This is for two main reasons (from my point of view),

a> Security. When you give the image format a chance to execute something like code or a hyperlink you are essentially creating a gap from which exploits may arise. Do you remember the WMF exploit recently?

b> Relevance. An image file is that *just an image* if you want to move to a format which allows code to be executed in a rich media environment. Try Flash.

- Wez