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
Solved

Check a PopUp Windows Properties

Posted on 2006-07-09
5
159 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…

839 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