Skip to Content

Javascript to click on a table row and select it

Hi, im trying to click on a table row using javascript. the rows dont appear to have any events names on them. I want to select a row by injecting javascript into the page so that i can then click to display a report relating to this table row.

I cant seem to trigger the on click event of the row which fires when i manually click on it.

Any help appreciared.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jun 23 at 07:15 PM

    Hello Chris Ingram

    Did you search the web? Here's a generic example of how to trigger an event in JavaScript.

    https://stackoverflow.com/questions/2705583/how-to-simulate-a-click-with-javascript

    Or is the issue more complicated? Maybe the issue is to find the proper object on which the event should be triggered?

    Kind regards,
    Mateusz
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 26 at 03:15 PM

    Hi Mateeusz, yes i have looked at many webpages and contacted several people who also cant figure out this issue.

    A mouse click seems to fire an event, but not a click() with javascript. Been through various scripts but nothing seems to fire the event as expected.

    The table that needs clicked on and row selected is within a frame within a frame within many divs and tables which seem to be common across SAP webpages.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.