Web Analytics Made Easy -
StatCounter Incorporating a "onmouseover" & "Window.open" - CodingForum

Announcement

Collapse
No announcement yet.

Incorporating a "onmouseover" & "Window.open"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Incorporating a "onmouseover" & "Window.open"

    I had a friend check out my web site to see the email function however he brought to my attention that the "onmouseover" function makes the text appear as hyperlinks and so he clicked on them produceing a blank-error page in Explorer. What I would like to do is have both the mouse roll over and the ability to "click" and produce a new window with the picture associated with the rollover. Is this possible and how would one do this?

    As always thanking you in advance for your help.

    John Campbell

    http://members.dsli.com/jcampbell

  • #2
    You may use

    onclick="return false"

    But... Why passing those parametrs in such a strange manner?

    You have
    <a href="Image.jpg" onMouseover="changeimage(myimages[3],this.href)">

    I think

    <a href="#" onmouseover = "changeimage(myimages[3],'Image1.jpg');return false">

    or

    <a href="javascript:void(changeimage(myimages[3],'Image1.jpg');return true))">

    will do the same job
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

    Comment


    • #3
      Sorry, one mistahe , the second option must be

      <a href="javascript:void();return true" onmouseover="changeimage(myimages[3],'Image1.jpg')">


      Note! Replace the empty space between java and script this forum automatically insert on publishing this linked word
      KOR
      Offshore programming
      -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

      Comment


      • #4
        Thank you for your help KOR. I got the site links not to open an error page when clicked-on and the rollover picture changes as it should. Still having problems w/bringing the picture (in the rollover) up in a new window. Could you explain what exactly goes between the "Java & the Script" in you second option which I believe will accomplish this.?. Again thanks for your help.

        John Campbell

        Comment


        • #5
          Still having problems w/bringing the picture (in the rollover) up in a new window
          I don't quite understand... Can you detail a bit?

          what exactly goes between the "Java & the Script
          I mean that in the code line you should write javascript with no space between java and script. This Forum split automatically these two words when written altogether, from nebulous reasons, I reckon
          KOR
          Offshore programming
          -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

          Comment

          Working...
          X