Computing.Net > Forums > Programming > popup and close window

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

popup and close window

Reply to Message Icon

Name: dan
Date: June 3, 2003 at 21:42:21 Pacific
OS: win2000
CPU/Ram: tbird 1.8/1GB ddr
Comment:

2 questions:

1)I need to create link to open a new instance of a browser window. Thats easy set the "target" attribute to = "newwindow". But I would like the new window to be a certain size and not have a toolbar or title bar. Yes this is going to be a popup window but not an advertisment or anything.

2)This is related to the above question. How can I close the 1 instance of the browser(the popup window) with a link. I did this in javascript once but internet explorer would warn the user before closing the window with an annoying msgbox. So I would like it to simply close without warning.

Your help is very appreciated!



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: June 13, 2003 at 20:23:41 Pacific
Reply:

use javascript:

Do something like:

;

Play with the width and height to get the size you want.

Later,
Chi Happens
Play with the width and height to get the size you want.

Later,
Chi Happens


0

Response Number 2
Name: Chi Happens
Date: June 13, 2003 at 20:25:42 Pacific
Reply:

Argg, the forum deleted my HTML formatting
my message should read:
script language="Javascript"
function PopUpWindow(tURL,Width,Height)
{
 var Options = "width=" + Width + ",height=" + Height;
 window.open(tURL,'',Options);
}
/script

then set the a href to:
Pop Me Up

Play with the width and height to get the size you want.

Later,
Chi Happens

Play with the width and height to get the size you want.

Later,
Chi Happens


0

Response Number 3
Name: chi happens
Date: June 13, 2003 at 20:27:51 Pacific
Reply:

geez, its like a monkey trying to hump a football to post to this group...

the html gets all warped.

ok here is the link (with the tags missing greater and less than symbols)

a href="JavaScript:PopUpWindow('http://www.someurl.com',400,500);"Pop Me Up/a

phew


0

Response Number 4
Name: Chi Happens
Date: June 13, 2003 at 20:33:56 Pacific
Reply:

part 2 of you question is to use

window.close();

in the popped up window.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


serial port programming error coodoo35



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: popup and close window

port opening and closing www.computing.net/answers/programming/port-opening-and-closing/2551.html

Min, Max and Close buttons www.computing.net/answers/programming/min-max-and-close-buttons/5793.html

programming in java www.computing.net/answers/programming/programming-in-java/7346.html