Link to home
Start Free TrialLog in
Avatar of dpinto04
dpinto04

asked on

Check a PopUp Windows Properties

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>
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

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).....
Avatar of dpinto04
dpinto04

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial