PDA

View Full Version : using js to open and close windows


kies
11.06.2001, 09:15
happy monday morning all,
..shame the sixers lost last night though...
anyway
i can't seem to figure out how to code this:
i have a web-app. i want to put it into a 700x500 window, without toolbars, to make it look more app-like. (as opposed to a standard browser window) the app will be linked to from many diff sites, so i can't use a javascript hyperlink. what i want to do is all links point to index.html, which is a standard window. onload, this window will spawn the main app window, in a 700x500 window. i want that new window to close the window that spawned it. (window.opener). dig? can't get this to work yet...
any insight/experience would be helpful...

//kies

jayonthenet
11.06.2001, 09:20
hi kies!

a simple "opener.close()" should do the trick ...


greets

jayonthenet

kies
11.06.2001, 10:15
hey good call,
BUT
now i get a silly 'do you want to close this window' prompt...
hmm...

//kies

jc
12.06.2001, 18:38
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
hey good call,
BUT
now i get a silly 'do you want to close this window' prompt...
hmm...

//kies
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>

actualy JavaScript can only close windows that are opened with JavaScript otherwise, you will alwais have the 'do you want to close this window' prompt if you realy want to get rip of the opener window, rezsize it to 0,0 or better make it load an other page, resize it an make it a menu for your web app

Xanth
12.06.2001, 20:10
Yup you can't close "Main" windows via JavaScript without the alert...

<font color=teal>xanth = createElement("person");
xanth.setAttribute("name", "Mike");
xanth.setAttribute("mail", "[url:drfrjgazx3]belgedin@earthlink.net[/url:drfrjgazx3]");
xanth.setAttribute("age", 16)
document.forum.appendChild(xanth);
</font id=teal>

kies
13.06.2001, 08:55
hmm-somethnig else came up, i'll have to drop this project for awhile...seems like it's 'undoable' anyway. poop! thanks all.

Edited by - kies on 06/14/2001 06:44:19