Closed Bug 3345 Opened 25 years ago Closed 25 years ago

javascript handler when clicking on a link does not get called

Categories

(Core :: JavaScript Engine, defect, P2)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 1646

People

(Reporter: morse, Assigned: vidur)

Details

The following content should give an initial alert message and display a missing
image.  If that image is clicked on, a second alert message saying "in handler"
should appear.

In 4.5 it works as described above.  In 5.0, the second alert message does not
appear indicating that the handler was never called.

Needless to say, this is one of many bugs that are currently blocking
development of client-side wallet.

<html>
  <head>
    <script>
      function handler() {
        alert ("in handler");
      }
      alert("just a test to make sure alert works");
    </script>
  </head>
  <body>
    <form>
      <table>
        <tr>
          <td>
            <a HREF="javaScript:handler()">
              <IMG WIDTH="75" HEIGHT="40">
            </a>
          </td>
        </tr>
      </table>
    </form>
  </body>
</html>
Summary: javascript handler when clicking an image does not get called → javascript handler when clicking on a link does not get called
Example can be simplified further by changing the line:

   <IMG WIDTH="75" HEIGHT="40">

to be simply

   click me

Now this has nothing to do with any images but rather with links themselves.  So
the summary is being changes to reflect that.
Assignee: norris → vidur
This is almost certainly in the DOM, not JavaScript.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
This is a DUP of the javascript: bug. A workaround is to use the more
conventional onclick attribute. In this case:

<a HREF="" onclick="handler(); return false;">

*** This bug has been marked as a duplicate of 1646 ***
Javacsript component begin retired.  Moving this bug to Javascript Engine.
Status: RESOLVED → VERIFIED
Verified Dup
Component: JavaScript Engine → Networking
Component: Networking → JavaScript Engine
You need to log in before you can comment on or make changes to this bug.