Dialog to show when a page first loads?

Dialog to show when a page first loads?

Is there a way to get a Dialog to show when a page first loads? I would like to ask the user a question when he/she first loads the page. I know how to use a button to show a dialog. i guess i could have the button that is hidden and then use jquery to click it onload but is there a better way?

Thanks for your help