NOTE: This widget is just a simplified example. You should try to avoid inline scripts and use unobstrusive approach instead!