Solved

Want to make image clickable in this code

Posted on 2007-11-17
7
312 Views
Last Modified: 2010-04-21
Hi,

I have this code, what I want is when someone clicks on the image the code should work to.
How to do that?

Thanks,
HP


if(isPPC()) {
							document.write('<img src="http://www.scheerkoppen.nl/images/mailafriend.jpg" alt="Mail deze pagina naar een bekende"><A class="standard" HREF=\"mailto:\?subject\=Bekijk deze pagina die ik heb gevonden, ' + document.title + '?body=Klik op: ' + window.location + '\" onMouseOver="window.status=\'Mail deze pagina\'; return true" TITLE="Mail deze pagina ">mail deze pagina<\/A>');
							}

Open in new window

0
Comment
Question by:HPvH
  • 3
  • 2
  • 2
7 Comments
 
LVL 1

Expert Comment

by:beckman55
ID: 20305305
check out the following site.  I think this is what your looking for.

http://catcode.com/linkguide/clickimage.html
0
 
LVL 1

Expert Comment

by:beckman55
ID: 20305315
For both codes below you will need to make sure you remove the ** before you use them

To make an image into a hyper (clickable) link is a very easy code.

In HTML it is

<**a href="http://URL you want them to go to" target="_blank"**> <**img src="http://URL of picture that you want to use"**><**/a**>

For forums such as ours, you use this code ..

[URL**=http://URL of the site][**IMG]http://URL of the image[**/IMG] [**/URL]
0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20305392
This should work.
if(isPPC()) 
{
    document.write('<A class="standard" HREF=\"mailto:\?subject\=Bekijk deze pagina die ik heb gevonden, ' + document.title + '?body=Klik op: ' + window.location + '\" onMouseOver="window.status=\'Mail deze pagina\'; return true" TITLE="Mail deze pagina "><img src="http://www.scheerkoppen.nl/images/mailafriend.jpg" alt="Mail deze pagina naar een bekende">mail deze pagina<\/A>');
}

Open in new window

0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

by:HPvH
ID: 20305451
Nizsmo,

The you can click on the picture, the only thing now is that the body text comes in the subject of the mail...??
0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20305485
This should work.
if(isPPC()) 
{
document.write('<a class="standard" HREF="mailto:me@me.com?subject=Bekijk deze pagina die ik heb gevonden, ' + document.title + '&body=Klik op: ' + window.location + '" onMouseOver="window.status=\'Mail deze pagina\'; return true" TITLE="Mail deze pagina "><img src="http://www.scheerkoppen.nl/images/mailafriend.jpg" alt="Mail deze pagina naar een bekende" border=0>mail deze pagina<\/a>');
}

Open in new window

0
 
LVL 21

Accepted Solution

by:
nizsmo earned 125 total points
ID: 20305493
Refined, removed the "\" at the end, as you don't need it.
if(isPPC()) 
{
document.write('<a class="standard" HREF="mailto:me@me.com?subject=Bekijk deze pagina die ik heb gevonden, ' + document.title + '&body=Klik op: ' + window.location + '" onMouseOver="window.status=\'Mail deze pagina\'; return true" TITLE="Mail deze pagina "><img src="http://www.scheerkoppen.nl/images/mailafriend.jpg" alt="Mail deze pagina naar een bekende" border=0>mail deze pagina</a>');
}

Open in new window

0
 

Author Closing Comment

by:HPvH
ID: 31409743
Thanks!
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question