How to attach an event to a html table cell?

Ace_McCloud

New Member
Joined
Apr 4, 2017
Messages
2
The html table (sample) is shown below. I want to attach an event (which opens a hyper link), when the mouse cursor is on Guj. Automotive. The event has to be fired, when the user performs a "LEFT click on the mouse". Please note that, the table doesnt have any events attached to it via javascript in the actual webpage.[TABLE="class: table table-striped"]
<tbody>[TR]
[TH="class: text"]
<!-- react-text: 137 -->S.No.<!-- /react-text -->
<!-- react-text: 139 --><!-- /react-text -->




[/TH]
[TH="class: text"]
<!-- react-text: 145 -->Name<!-- /react-text -->
<!-- react-text: 147 --><!-- /react-text -->


name

[/TH]
[TH]
<!-- react-text: 153 -->CMP<!-- /react-text -->
<!-- react-text: 155 -->Rs.<!-- /react-text -->


Current price

[/TH]
[TH]
<!-- react-text: 161 -->P/E<!-- /react-text -->
<!-- react-text: 163 --><!-- /react-text -->


Price to Earning

[/TH]
[TH]
<!-- react-text: 169 -->Mar Cap<!-- /react-text -->
<!-- react-text: 171 -->Rs.Cr.<!-- /react-text -->


Market Capitalization

[/TH]
[TH]
<!-- react-text: 177 -->Div Yld<!-- /react-text -->
<!-- react-text: 179 -->%<!-- /react-text -->


Dividend yield

[/TH]
[TH]
<!-- react-text: 185 -->NP Qtr<!-- /react-text -->
<!-- react-text: 187 -->Rs.Cr.<!-- /react-text -->


Net Profit latest quarter

[/TH]
[TH]
<!-- react-text: 193 -->Qtr Profit Var<!-- /react-text -->
<!-- react-text: 195 -->%<!-- /react-text -->


YOY Quarterly profit growth

[/TH]
[TH]
<!-- react-text: 201 -->Sales Qtr<!-- /react-text -->
<!-- react-text: 203 -->Rs.Cr.<!-- /react-text -->


Sales latest quarter

[/TH]
[TH]
<!-- react-text: 209 -->Qtr Sales Var<!-- /react-text -->
<!-- react-text: 211 -->%<!-- /react-text -->


YOY Quarterly sales growth

[/TH]
[TH]
<!-- react-text: 217 -->CMP / BV<!-- /react-text -->
<!-- react-text: 219 --><!-- /react-text -->


Price to book value

[/TH]
[/TR]
[TR]
[TD="class: text"]<!-- react-text: 226 -->1<!-- /react-text --><!-- react-text: 227 -->.<!-- /react-text -->[/TD]
[TD="class: text"]Guj. Automotive[/TD]
[TD]349.30[/TD]
[TD]11.51[/TD]
[TD]61.13[/TD]
[TD]0.00[/TD]
[TD]1.34[/TD]
[TD]2.29[/TD]
[TD]6.91[/TD]
[TD]-29.35[/TD]
[TD]1.74[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top