/    Sign up×
Community /Pin to ProfileBookmark

Frameless Popup Window…simple code

Hey everyone…the board is nice and I’m sure I’ll get comfortable hanging around here learning some new skills. But for now I have objective I’m trying to figure out, the code is pretty simple:

<html>

<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=windows-1252″>
<title>Testing</title>

</head>

<BODY onload=”myfunction()”>

<script LANGUAGE=JavaScript>

function myfunction()
{
window.resizeTo(350,200);
window.moveTo(450,150);
}
</script>

TestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTesting</body>

</html>

This window will automatically launch when I preview it in the browser…well I want it to be frameless…I have seen the frameless script out there…and I dont need all that code for this to work…its something simple that I am missing. I also need it to resize on its own, for example if there was a picture that was 437 x 213…then the window will automatically go to that size etc…

Can someone help me out please, in the meantime I will be researching the problem, I appreciate it. Thanks.

Fred

to post a comment
JavaScript

15 Comments(s)

Copy linkTweet thisAlerts:
@Zach_ElfersDec 04.2002 — Is this what your looking for?

<script language="JavaScript" type="text/JavaScript">

if (window != top) top.location.href = location.href;

</script>

That will get rid of frames IF they are there. Hope that helps.?
Copy linkTweet thisAlerts:
@BiggnauthorDec 04.2002 — This is what the code looks like with what you gave me....

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Testing</title>

</head>

<BODY onload="myfunction()">

<script LANGUAGE="JavaScript" type="text/JavaScript">

if (window != top) top.location.href = location.href;

function myfunction()

{

window.resizeTo(350,200);

window.moveTo(450,150);

}

</script>

TestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTestingTesting

</body>

</html>



I'm trying to get rid of IE's frame's/buttons etc...this isn't working...does it have to be inside my onload???

Also if anyone knows how to make this window automatically resize to what its opening up to....like I said in my first post...that would be appreciated as well....thanks.

Fred
Copy linkTweet thisAlerts:
@Zach_ElfersDec 04.2002 — Just make that in a new script. It doesn't have to be in your current one.
Copy linkTweet thisAlerts:
@BiggnauthorDec 04.2002 — This is not working zach...what other script are you wanting me to add to it...the script I have already launches the popup window immediately and places it in the right-hand corner....

When I preview in the browser I want it to launch a pop-up window immediately (no link for it)

then I want it to have no title bar (no IE title bar/buttons

etc...)

I also want it to resize to what ever information will be inside...Example: If there is a picture thats 700 x 550 I want the window to automatically resize to that picture exactly.

Thanks,

Fred
Copy linkTweet thisAlerts:
@BiggnauthorDec 04.2002 — Any ideas guys?

I'm still researching and getting ideas...could I use the border property to get the IE title bar/buttons out of here?

Thanks,

Fred
Copy linkTweet thisAlerts:
@radynskiDec 04.2002 — You cannot remove or add the toolbars that IE adds to it's windows once the window has been created. You must define those settings when you open the window. I assume that you are using a window.open() command to make this window (if not, seriously consider it). Just change your status parameter appropriately. And if I'm not mistaken, the default is not to display those bars.

A simple window.open('url.htm', 'WindowName', 'menubar=no,scrollbars=yes,resizable=yes,width=450,height=430'); should do the trick for you.
Copy linkTweet thisAlerts:
@CharlesDec 04.2002 — [font=georgia]Zach,

Be careful; [font=monospace]top.location.href = location.href[/font] has the side effect of disabling the user's 'back' button. That fragment loads the document in the top frame but it adds an entry to the history list. Hit 'back' and you end up executing the fragment again. Use instead:[/font]

[font=monospace]

if (top.location.href != self.location.href) top.location.replace(self.location.href)

[/font]
Copy linkTweet thisAlerts:
@Zach_ElfersDec 04.2002 — Thanks Charles. I'll have to remember that in case I ever have to use this script.?
Copy linkTweet thisAlerts:
@BiggnauthorDec 05.2002 — Actually, heres what I ended up using instead...

window.open("docname","docTitle","height,width")

Fred

Oh and radynski yes you can do all that...
Copy linkTweet thisAlerts:
@samnewberryDec 06.2002 — [i]Originally posted by Biggn [/i]

[B]Actually, heres what I ended up using instead...



window.open("docname","docTitle","height,width")



Fred



Oh and radynski yes you can do all that... [/B]
[/QUOTE]


I have a similar question out there regarding this very issue. I am using the same window.open("doc","doctitle","height,width") but I am looking to remove the Blue Windows Title Bar from the Web Browser. Any ideas on how to remove that? I've got the frameless window with no toolbars, scrollbars, etc. but I can't find anyway to remove that.

Thanks in advance to your help!

Sam
Copy linkTweet thisAlerts:
@gil_davisDec 06.2002 — The window title bar is protected by browser security features. You are prohibited from opening a titlebarless window without a security certificate (very expensive) and the client's acceptance of that certificate to make you a "truested site".
Copy linkTweet thisAlerts:
@samnewberryDec 06.2002 — SSL certificate?? We are trying to do this on our Intranet...
Copy linkTweet thisAlerts:
@pyroDec 06.2002 — I'm not sure if this is what you're looking for, but give it a try.

http://www.dynamicdrive.com/dynamicindex8/chromeless.htm
Copy linkTweet thisAlerts:
@BiggnauthorDec 06.2002 — Sam:

You can accomplish the process you are attempting by combining the height and width properties with the word fullscreen. you will see below how I accomplished this:

NewWindow = window.open("DocName","Title","fullscreen",+var);

as you see we put fullscreen, in quotes and then the var represents a variable in which we loaded the height and width values. IE: var = "Height=200,Width=250"

Try this approach it should work for you.
Copy linkTweet thisAlerts:
@norbertoDec 07.2002 — @pyro

... the frameless should be a bug in the windows browser. Any script with the framless window won´t work, when the user has the new XP - Upgrade: SP1

I removed all my frameless scripts therfore.

Hope it helps.
×

Success!

Help @Biggn 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...