Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Load an image in the same page AFTER clicking a link


  • Please log in to reply

#1
Supercalifragilistic

Supercalifragilistic

    Member

  • Member
  • PipPipPip
  • 404 posts
I want it so that there's no image, but when someone clicks "contact", an image of my email appears. Possible?
  • 0

Advertisements


#2
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Possible using a script or even just a mouseover of Contact can bring up the image.

Ron
  • 0

#3
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
Hi,

i'd use JavaScript.

Heres how id do it:

In the BODY tag, wherever fits your layout:
<a onclick="displayEmail()">Contact</a>

<!--Whereever you want this image to appear-->
<div id="contactImage">
</div>

In the HEAD tag:
<script type="text/javascript">

function displayEmail(){

	var img = document.createElement('img'); //creates and <img> element and stores it in the 'img' var
	img.setAttribute('src', "myImage.gif"); //sets the source of the element
	document.getElementById('contactImage').appendChild(img); //adds that <img> element to the <div> with id of 'contactImage'

}
</script>

and thats how simple it is :whistling:

Any queries about that then just ask,

jpshortstuff

Edited by jpshortstuff, 19 July 2007 - 04:08 PM.

  • 0

#4
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Possible using a script or even just a mouseover of Contact can bring up the image.

Ron
  • 0

#5
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:07 PM.

  • 0

#6
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Duplicate post removed because server hung up for over 30 minutes.

Ron

Edited by Major Payne, 19 July 2007 - 04:04 PM.

  • 0

#7
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:07 PM.

  • 0

#8
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:07 PM.

  • 0

#9
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:08 PM.

  • 0

#10
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:08 PM.

  • 0

Advertisements


#11
Major Payne

Major Payne

    Retired Staff

  • Retired Staff
  • 5,307 posts
Duplicate post removed because server hung up for over 30 minutes.

Ron

Edited by Major Payne, 19 July 2007 - 04:04 PM.

  • 0

#12
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:09 PM.

  • 0

#13
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:09 PM.

  • 0

#14
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
test
  • 0

#15
jpshortstuff

jpshortstuff

    Member

  • Member
  • PipPipPip
  • 119 posts
DUPLICATE

Edited by jpshortstuff, 19 July 2007 - 04:06 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP