Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

Want to make image clickable in this code

Posted on 2007-11-17
7
Medium Priority
?
318 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …
Suggested Courses

647 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