/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Frameless popup window

Hi

I know how to set a popup window with options, such as, onclick=” window.open(‘mypage.htm’,’OVERVIEW’,’toolbar=0,location=0,directories=0,
menuBar=0,scrollbars=0,resizable=0,width=375,height=350′), However, what I really want to get is an entirely frameless window (i.e. without maximize, minimize and x buttons) It will require a button to close the window though. Maybe it is impossible to do that with windows. If possible, does anyone know how to do the script? Thanks in advance.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@Roberto2010authorFeb 21.2009 — Hi everybody

I solved it by using iFrame within a layered Div and added a close button. It can be configured to have a border, scrollbars, size and position, etc. and you can target the iframe ID by many pages through links in the parent page.

Here is the code:

<html>

<head>

<script language="JavaScript1.2">

var ie=document.all

var dom=document.getElementById

var ns4=document.layers

var calunits=document.layers? "" : "px"

function initbox(){

if (!dom&&!ie&&!ns4)

return

crossobj=(dom)?document.getElementById("popup").style : ie? document.all.popup : document.popup

crossobj.visibility=(dom||ie)? "visible" : "show"

}

function dismissbox(){

crossobj.visibility="hidden"

}

</script>

</Head>

<body>

<p align="left"><a href="javascript:initbox()"><font color="#000000">Show Frameless Window</font></a></p>

<div id="popup" style="position:absolute;visibility:hidden;left:198px;top:100px;width:500px;height:375px;background-color:#F5F5F5">

<div align="right"><input STYLE="color:blue;font-size:12px" type="button" Value="Close Box" onclick="dismissbox();return false"></div>

<iframe name="event" src="anypage.htm" target="_blank" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" height="375" width="500">

Your browser does not support inline frames or is currently configured not to display inline frames.

</iframe>

</div>

</body>

</html>

Thank you all...
×

Success!

Help @Roberto2010 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 11.30,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @bahaedd,
tipped: article
amount: 1000 SATS,

tipper: @Balmasexy,
tipped: article
amount: 1000 SATS,

tipper: @mbsaad,
tipped: article
amount: 1000 SATS,
)...