473,383 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Overlay Red X on jpeg images?

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
Jul 23 '05 #1
5 2709
Andy wrote:
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">

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
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

"Randy Webb" <hi************@aol.com> wrote in message
news:xM********************@comcast.com...
Andy wrote:
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">

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #3
In article <3H*****************@news.uswest.net>, "Andy" <an**@shirtshackomaha.com> wrote:
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.

--
While my e-mail address is not munged, | T.******@ieee.org
I probably won't read anything sent there. |
Jul 23 '05 #4
Ray

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

http://kahaha.tripod.com/Learning/Ov...geSwapRedX.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

On Tue, 6 Apr 2004 22:36:26 -0500, "Andy" <snip> wrote:
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


Jul 23 '05 #5
Thanks:
just what I'm looking for.

Andy
"Andy" <an**@shirtshackomaha.com> wrote in message
news:3H*****************@news.uswest.net...
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

Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Derek | last post by:
I wanted to know if anyone had any insight or sample code of creating an AVI file from a directory of JPEG images. I have read the thread that that speaks about creating a MOV file from JPEG images...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
3
by: markus | last post by:
I have an application that I think was developed using some form of Borland C with a folder for BIG images with the extension .fre. When I try to view them they cannot be read even by changing the...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
4
by: Rednelle | last post by:
Greetings all, As a newbie, using Access 2000, I would appreciate advice on the best way to include pictures. I have developed a 'Home Inventory' database which can include jpeg thumbnails of...
1
by: sendhil | last post by:
hi, Iam doing some graphics programming with C#. I have to create a Windows MetaFile from a base64 encoded string. How do i create the file. I want to Overlay this Windows MetaFile on a image...
0
by: odie5533 | last post by:
I am looking to make a program similar to Xfire which will overlay information while playing a directx game. For an example of what xfire is capable of, see the image below:...
12
by: comp.lang.php | last post by:
index.php: // STUFF // STEP 1: imagecreatetruecolor ONLY IF GD 2.0+ SUPPORTED AND FOUND if ($this->isSuccessful && !$hasMogrified && $image && !$newImage &&...
9
by: Chuck Anderson | last post by:
Is it possible to overlay a transparent watermark on an image - dynamically? I'd like the result to look like this example: <http://www.cycletourist.com/temp/photo.php> That is a bit of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.