Solved

Check a PopUp Windows Properties

Posted on 2006-07-09
5
162 Views
Last Modified: 2011-10-03
How do i check a PopUp Windows Properties once it loads?

I need to check the width, height, top position , left position, scrollbars and resizable values that are passed from the window.open function that launches this window.

How do I do this?

Checking if scroll is enabled and resize is disabled is most important.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<SCRIPT type=text/javascript>
function WinParams()
{
  if( //Verify widht, height and other things here)
  {
    alert("Valid Window");
  } else
{
    alert("Invalid Window");
}
}
</script>

</HEAD>

<body onload="self.focus();WinParams();">

</BODY>
</HTML>
0
Comment
Question by:dpinto04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 17071368
Can you tell us why you need to know?

It is not trivial to find these values unless you pass them in the url or have them as settings in the parent:

parent:

popResize = true
popScroll = false
function openWin() {
  window.open('test.html','newwin','scrollbars='+popScript+',resizable='+popResize)
}


child:

if (parent.popResize).....
0
 

Author Comment

by:dpinto04
ID: 17071485
Actually, i'll have a Window.open code that'll be installed on other sites, but which will draw data from our servers.
It'll be easy for users to change the size of the window and also enable or disable the scrollbars and tool bars and make things look odd.
Thats why i intend checking if the window is of a particular size and has scroll bars and is not resizable.
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 20 total points
ID: 17071549
Sound to me you are better off designing your page so it can be resized and scrolled and NOT look odd when that happens...

Michel
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question