You are here:

Javascript/Pop-up window behavior question

Advertisement


Question
Is it possible to make a pop-up window expand to a full daughter window (i.e. "maximize") if a user clicks a link in the pop-up?

if so, what's the code?  i'm looking for something sturdy.

thanks!

-andrew

Answer
The popup window should contain HTML such as this:

<input type="button" onclick="window.width = screen.availWidth + 8; window.height= screen.availHeight +8">

The +8 is necessary because the width and height of the window counts the thickness of the window border.

Good luck.

Danny Goodisman

Javascript

All Answers


Answers by Expert:


Ask Experts

Volunteer


Danny Goodisman

Expertise

I teach HTML and JavaScript at several Seattle-area colleges and universities, and also am expert at ColdFusion and SQL. I know a lot about CSS and DHTML as well.

Experience

I am the webmaster at CarToys.com, a site which sells cell phones and car stereos. I have programmed web pages for the past 9 years, professionally for 4, including building pages that use JavaScript extensively.

Organizations
Puget Sound Macromedia Users Group


Awards and Honors
StudyWeb Outstanding Educational Site, Featured Speaker at ColdFusion Users Group (Seattle)

©2012 About.com, a part of The New York Times Company. All rights reserved.