Hi, I'm working on a widget builder page and I'm a little lost as to how I would let someone set the options and then reload the "preview" widget on the page?

I've tried searching google, but I can't think of terms to use that find what I want instead of stuff about twitter widgets and wordpress widgets. Basically I made my own javascript widget that a person can copy and paste on their site to view our stuff, and now I just want to make a page for them to build and deploy a widget. Hopefully without reloading the whole page.

Similar to this: https://twitter.com/settings/widgets/new

Where do I start?