OnClick Event Question

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

    OnClick Event Question

    Hello,

    I have a thumbnail image with the onclick event. When clicked, a
    larger pic is displayed via a javascript funtion. When browsing the
    page, the client does not realize the image is clickable because the
    arrow your mouse displays as you browse from page to page, does not
    transform to the pointer--something that natuarally happens when you
    hover over a hyperlink. How may I provide this functionality?

    Thanks,
    John
  • Fabian

    #2
    Re: OnClick Event Question

    Spank hu kiteb:
    [color=blue]
    > Hello,
    >
    > I have a thumbnail image with the onclick event. When clicked, a
    > larger pic is displayed via a javascript funtion. When browsing the
    > page, the client does not realize the image is clickable because the
    > arrow your mouse displays as you browse from page to page, does not
    > transform to the pointer--something that natuarally happens when you
    > hover over a hyperlink. How may I provide this functionality?[/color]

    Style sheets.

    ..blah { cursor: hand; }

    The exact value of .blah will depend on your name/id attributes for your
    images.

    --
    --
    Fabian
    Visit my website often and for long periods!
    Rasakan sensasi bermain Mahjong paling mengasyikkan di AGAM69! Platform terpercaya dengan jackpot melimpah, bonus harian tanpa batas, dan pengalaman bermain premium yang membawa keberuntungan nyata. Bergabunglah bersama jutaan member aktif dan raih kemenangan terbesar Anda sekarang!


    Comment

    • Randy Webb

      #3
      Re: OnClick Event Question

      Spank wrote:
      [color=blue]
      > Hello,
      >
      > I have a thumbnail image with the onclick event. When clicked, a
      > larger pic is displayed via a javascript funtion. When browsing the
      > page, the client does not realize the image is clickable because the
      > arrow your mouse displays as you browse from page to page, does not
      > transform to the pointer--something that natuarally happens when you
      > hover over a hyperlink. How may I provide this functionality?
      >
      > Thanks,
      > John[/color]

      If you want it to act, look, and feel like a link, then make it a link.

      --
      Randy

      Comment

      • Alan P

        #4
        Re: OnClick Event Question

        An easier way, add a HREF to point to '#'
        "Spank" <spankbuddda@ya hoo.com> wrote in message
        news:1be98ac4.0 401130328.40501 01a@posting.goo gle.com...[color=blue]
        > Hello,
        >
        > I have a thumbnail image with the onclick event. When clicked, a
        > larger pic is displayed via a javascript funtion. When browsing the
        > page, the client does not realize the image is clickable because the
        > arrow your mouse displays as you browse from page to page, does not
        > transform to the pointer--something that natuarally happens when you
        > hover over a hyperlink. How may I provide this functionality?
        >
        > Thanks,
        > John[/color]


        Comment

        • mscir

          #5
          Re: OnClick Event Question

          Randy Webb wrote:[color=blue]
          > Spank wrote:
          >[color=green]
          >> Hello,
          >>
          >> I have a thumbnail image with the onclick event. When clicked, a
          >> larger pic is displayed via a javascript funtion. When browsing the
          >> page, the client does not realize the image is clickable because the
          >> arrow your mouse displays as you browse from page to page, does not
          >> transform to the pointer--something that natuarally happens when you
          >> hover over a hyperlink. How may I provide this functionality?
          >>
          >> Thanks,
          >> John[/color]
          >
          >
          > If you want it to act, look, and feel like a link, then make it a link.[/color]

          Randy,

          I did something similar. If you want an image to have the "hand" cursor
          you can use css to do it:

          <style type="text/css">
          img { cursor:pointer; }
          </style>

          Comment

          • nice.guy.nige

            #6
            Re: OnClick Event Question

            While the city slept, mscir <mscir@access4l ess.net> feverishly typed:
            [color=blue]
            > Randy Webb wrote:[color=green]
            >> Spank wrote:
            >>[color=darkred]
            >>> Hello,
            >>>
            >>> I have a thumbnail image with the onclick event. When clicked, a
            >>> larger pic is displayed via a javascript funtion. When browsing the
            >>> page, the client does not realize the image is clickable because the
            >>> arrow your mouse displays as you browse from page to page, does not
            >>> transform to the pointer--something that natuarally happens when you
            >>> hover over a hyperlink. How may I provide this functionality?
            >>>
            >>> Thanks,
            >>> John[/color]
            >>
            >>
            >> If you want it to act, look, and feel like a link, then make it a
            >> link.[/color]
            >
            > Randy,
            >
            > I did something similar. If you want an image to have the "hand"
            > cursor you can use css to do it:
            >
            > <style type="text/css">
            > img { cursor:pointer; }
            > </style>[/color]

            First, it is the OP who is having the problem, not Randy.

            Second, as Randy said, it should be a link. It currently acts like a link,
            and your code will help it look like a link, so let's actually make it one
            that will work alround...

            <a href="mypic.jpg " onClick="myjsfu nction('mypic.j pg'); return false;"><img
            src="mythumbnai l.jpg" width="100" height="100" alt="picture of something.
            Links to full size version" title="This is a thumbnail. Click on it to open
            the full size version in a pop-up window"></a>

            .... If javascript is available to the user, and enabled, then this will open
            the image in the pop-up. The 'return false' bit in the onClick attribute
            stops the file referenced in the href attribute being opened. If javascript
            is not available, then the file in href will open in the current browser,
            and the user will still be able to see the picture.

            Hope that helps,
            Nige

            --
            Nigel Moss.

            Email address is not valid. nigel@nigenetDO G.org.uk. Take the dog out!
            http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
            In the land of the blind, the one-eyed man is very, very busy!


            Comment

            Working...