Overlay Red X on jpeg images?

A

Andy

Is there a way to overlay a Red X on top of a .jpg image so the image still
is visible but X'd out?

function XitOut{
if(document.me.Quantity.value == 0)
{
Put a X over the .jpg image(Okay, I know thats not JS)
}
}


Andy
 
R

Randy Webb

Andy said:
Is there a way to overlay a Red X on top of a .jpg image so the image still
is visible but X'd out?

function XitOut{
if(document.me.Quantity.value == 0)
{
Put a X over the .jpg image(Okay, I know thats not JS)
}
}

Take the image, make a second one with the red X already on it. Then, do
a simple image swap.

if (document.forms['me'].elements['Quantity'].value == 0)
{
document.images['imageName'].src = 'imageWithX.jpg';
}


<img src="imageWithoutX.jpg" name="imageName">
 
A

Andy

I thought about that, but I have thousands of images, I would just like to
"X" out the image when the page loads if neccessary.
Maybe it just can't be done.

Andy

Andy said:
Is there a way to overlay a Red X on top of a .jpg image so the image still
is visible but X'd out?

function XitOut{
if(document.me.Quantity.value == 0)
{
Put a X over the .jpg image(Okay, I know thats not JS)
}
}

Take the image, make a second one with the red X already on it. Then, do
a simple image swap.

if (document.forms['me'].elements['Quantity'].value == 0)
{
document.images['imageName'].src = 'imageWithX.jpg';
}


<img src="imageWithoutX.jpg" name="imageName">
 
T

T. Postel

Is there a way to overlay a Red X on top of a .jpg image so the image still
is visible but X'd out?

function XitOut{
if(document.me.Quantity.value == 0)
{
Put a X over the .jpg image(Okay, I know thats not JS)
}
}


Andy
I'd put a transparent .gif file (of the red X) in a layer on top of the image
you want to X-out. You can either change the .src of the X-out image, all clear
or X, or change the layer visibility to change state.
 
R

Ray

Here's something that'll put the X on your pics:

http://kahaha.tripod.com/Learning/OverlayRedX/ImageSwapRedX.htm

Your image is place in the background of a <span> tag and is
initially covered with a transparent GIF. When your image is click'd,
the transparent .gif is swapped with a red X .gif that has a
transparent background. Height and width in the <img> tag should be
changed to match your image dimensions. I'm sure the code is crude
cause I've only been programming (HTML / CSS doesn't count) for a few
months now. Enjoy, Ray
 
A

Andy

Thanks:
just what I'm looking for.

Andy


Is there a way to overlay a Red X on top of a .jpg image so the image still
is visible but X'd out?

function XitOut{
if(document.me.Quantity.value == 0)
{
Put a X over the .jpg image(Okay, I know thats not JS)
}
}


Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top