Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6107789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:13:35+00:00 2026-05-23T14:13:35+00:00

oLink = document.getElementById(ItemDescend); alert(oLink); // fire up alert with link target addEventHandler(oLink, click, function(e)

  • 0
oLink = document.getElementById("ItemDescend");
alert(oLink); // fire up alert with link target
addEventHandler(oLink, "click", function(e) { alert(1); sortTable('theList', 0, true); preventDefault(e); },false); // does not fire up inner alert!

This above code functions in all other browsers as tested, but in Chrome 12 does not. I would be grateful if someone shows me a solution. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:13:36+00:00Added an answer on May 23, 2026 at 2:13 pm

    Your addEventHandler method is checking for an unrelated property, which is wrong.

    Instead, you should check for the addEventListener method, and only call attachEvent if that doesn’t exist.
    Change the condition to

    if (typeof (oNode.addEventListener) !== "function")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this bit of code to add a CSS link in the head
These code is the Server part of my proxy program, and its function is
Let's say I have a link in a table like: <td class=ms-vb width=100%> <a
Java lets you create an entirely new subtype of Throwable , e.g: public class
For some reason I can't find this through searches, not really sure what keywords
I'm building a web application (using prototype) that requires the addition of large chunks
I have the following HTML (a snippet): <td class=ms-vb-title height=100%> <table class=ms-unselectedtitle onmouseover=OnItem(this) ctxname=ctx1
I don't like storing sitewide crypto keys and DB access information under document_root, so
I have a Rails app that processes a large (millions) number of records in
Java has some very good open source static analysis tools such as FindBugs ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.