Skip to content

Instantly share code, notes, and snippets.

@troywarr
Created July 10, 2017 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troywarr/e6d074a61c92f6f82ff823f073d6e0e9 to your computer and use it in GitHub Desktop.
Save troywarr/e6d074a61c92f6f82ff823f073d6e0e9 to your computer and use it in GitHub Desktop.
Self-Sizing Popup Example
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Index</title>
</head>
<body>
<a href="javascript:;">Open Popup</a>
<script>
document.querySelector('a').onclick = function (event) {
var settings = [
'menubar=0',
'toolbar=0',
'location=0',
'personalbar=0',
'status=0',
'dependent=1',
'dialog=1',
'resizable=0',
'scrollbars=1',
'width=100',
'height=100',
'centerscreen=1',
'chrome=1'
],
popup = window.open('./popup.html', 'siebel_form', settings.join(','));
};
</script>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Popup</title>
</head>
<body>
<p>Popup</p>
<script>
window.resizeTo(300, 300);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment