Solved

Want to make image clickable in this code

Posted on 2007-11-17
7
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 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