I have created a simple webpage that launches a widget after a button is pressed. The button press adds an element to the DOM tree:
var div = document.getElementById("loginWidget");
var loginWidget = document.createElement('script');
loginWidget.setAttribute("type", "text/javascript");
loginWidget.setAttribute("src", "http://widgetstore.etc.etc");
div.appendChild(loginWidget);
This launches the login widget in the webpage. How do I get it to open in a new window (preferably resized to the size of the widget? If I do it like this will my original window be able to access values from the login widget? If this is a bad idea what's the best way to style the widget so it stands out more from the original size.
Forgive my n00bness. Would normally research this myself but in a bit of a hurry!