While programming in javascript, getting error "Cannot read property 'style' of null" please help me

@senocular Thanks for your reply.
Backticks was not issue. I was not able to paste code, that’s why I have removed it.

I am not able to figure out why rowId is giving null value. Do you have alternate way for this.