Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   Overlay Red X on jpeg images? (http://www.velocityreviews.com/forums/t876564-overlay-red-x-on-jpeg-images.html)

Andy 04-07-2004 03:36 AM

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



Randy Webb 04-07-2004 04:55 AM

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(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/

Andy 04-07-2004 12:16 PM

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(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/



T. Postel 04-07-2004 03:57 PM

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(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.Postel@ieee.org
I probably won't read anything sent there. |

Ray 04-07-2004 11:18 PM

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 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
>



Andy 04-09-2004 12:38 PM

Re: Overlay Red X on jpeg images?
 
Thanks:
just what I'm looking for.

Andy


"Andy" <andy@shirtshackomaha.com> wrote in message
news:3HKcc.111$SP4.81792@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





All times are GMT. The time now is 07:25 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.