Reputation: 81
How can I replicate the plain window that appears on the Chrome Web Store where you click Add to Chrome when downloading an app?
The window/pop-up has no tool bar, no scroll bar and only has a button to close it in the far right corner, no button to minimise.
Upvotes: 3
Views: 1885
Reputation: 105
I believe the popup in the Chrome Web Store is not a HTML or JavaScript generated one but a window component of the Chrome browser itself.
However, you can use CSS and JavaScript to build something like the following:
<html>
<head>
<script type="text/javascript">
function popup() {
var disp = document.getElementById('floatingDiv').style.display;
if(disp == 'block') disp = 'none';
else disp = 'block';
document.getElementById('floatingDiv').style.display = disp;
}
</script>
<style type="text/css">
#floatingDiv {
display: none;
position: absolute;
top: 100px;
left: 100px;
}
</style>
</head>
<body>
<a href="javascript:popup()">Hello World!</a>
<div id="floatingDiv" style="background: #dddddd; width: 320px; height: 240px;">
I am a floating div!
</div>
</body>
</html>
Of course you have full control over the display of the floating div.
Upvotes: 2