Define and use mediaHeightId, mediaWidthId from widget to view to javascript