> Programming Languages > Javascript
Various Topics Home | Disclaimer | Report Adult Posts

Various Topics on Javascript



Javascript - "Overlay Red X on jpeg images?" in Programming Languages


Old 04-07-2004   #1
....
 
Default 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(do***ent.me.Quantity.value == 0)
{
Put a X over the .jpg image(Okay, I know thats not JS)
}
}


Andy


 
Old 04-07-2004   #2
..n.. ....
 
Default Re: Overlay Red X on jpeg images?

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(do***ent.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 (do***ent.forms['me'].elements['Quantity'].value == 0)
{
do***ent.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/
 
Old 04-07-2004   #3
....
 
Default Re: Overlay Red X on jpeg images?

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" <hikksnotathome@aol.com> wrote in message
news:xMedndR4QfF6FO7dRVn_iw@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(do***ent.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 (do***ent.forms['me'].elements['Quantity'].value == 0)
{
do***ent.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/


 
Old 04-07-2004   #4
.. ..st..
 
Default Re: Overlay Red X on jpeg images?

In article <3HKcc.111$SP4.81792@news.uswest.net>, "Andy" <andy@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(do***ent.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.Postel@ieee.org
I probably won't read anything sent there. |
 
Old 04-08-2004   #5
..y
 
Default Re: Overlay Red X on jpeg images?


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 c****'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(do***ent.me.Quantity.value == 0)
>{
>Put a X over the .jpg image(Okay, I know thats not JS)
>}
>}
>
>
>Andy
>


 

Thread Tools
Display Modes





Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0