is there a way to set the unique id of a page component in javascript?

Alternately, is it possible to access information from the context row using merge syntax. I could assign the unique Id to the control that way if there is.