Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Overlay Red X on jpeg images?

Reply
Thread Tools

Overlay Red X on jpeg images?

 
 
Andy
Guest
Posts: n/a
 
      04-07-2004
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


 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      04-07-2004
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/
 
Reply With Quote
 
 
 
 
Andy
Guest
Posts: n/a
 
      04-07-2004
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" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
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/


 
Reply With Quote
 
T. Postel
Guest
Posts: n/a
 
      04-07-2004
In article <3HKcc.111$(E-Mail Removed)>, "Andy" <(E-Mail Removed)> 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, | http://www.velocityreviews.com/forums/(E-Mail Removed)
I probably won't read anything sent there. |
 
Reply With Quote
 
Ray
Guest
Posts: n/a
 
      04-07-2004

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
>


 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      04-09-2004
Thanks:
just what I'm looking for.

Andy


"Andy" <(E-Mail Removed)> wrote in message
news:3HKcc.111$(E-Mail Removed)...
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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fs: Detroit Red Wings, Red Alert - Hockeytown 3 sonof3m DVD Video 0 12-17-2004 12:59 AM
Datawrite Red (V3) Red - DVD-R's Alex B Computer Support 3 07-16-2004 12:08 AM
Exiff-jpeg and jpeg certsnsearches Digital Photography 2 01-07-2004 08:13 PM
huge jpeg files show as very small thumbnails (canon 300d, JPEG) kl Digital Photography 6 11-12-2003 08:11 PM
Red Hat Defines end of Red Hat Linux steve NZ Computing 14 11-06-2003 06:19 AM



Advertisments