Overlay Red X on jpeg images?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy

    #1

    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

    #2
    Re: Overlay Red X on jpeg images?

    Andy wrote:[color=blue]
    > 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)
    > }
    > }
    >[/color]

    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="imageWitho utX.jpg" name="imageName ">

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javas cript FAQ - http://jibbering.com/faq/

    Comment

    • Andy

      #3
      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:xMedndR4Qf F6FO7dRVn_iw@co mcast.com...
      Andy wrote:[color=blue]
      > Is there a way to overlay a Red X on top of a .jpg image so the image[/color]
      still[color=blue]
      > 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)
      > }
      > }
      >[/color]

      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="imageWitho utX.jpg" name="imageName ">

      --
      Randy
      Chance Favors The Prepared Mind
      comp.lang.javas cript FAQ - http://jibbering.com/faq/


      Comment

      • T. Postel

        #4
        Re: Overlay Red X on jpeg images?

        In article <3HKcc.111$SP4. 81792@news.uswe st.net>, "Andy" <andy@shirtshac komaha.com> wrote:[color=blue]
        >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
        >
        >[/color]
        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.o rg
        I probably won't read anything sent there. |

        Comment

        • Ray

          #5
          Re: Overlay Red X on jpeg images?


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



          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:
          [color=blue]
          >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
          >[/color]

          Comment

          • Andy

            #6
            Re: Overlay Red X on jpeg images?

            Thanks:
            just what I'm looking for.

            Andy


            "Andy" <andy@shirtshac komaha.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



            Comment

            Working...