Solved

Close the previous window

Posted on 1998-11-10
12
140 Views
Last Modified: 2010-04-09
I've got a splash page from where I'm launching another window with window.open. At the same time I want to minimize the splash window, and if I use

this.window.resizeTo(1,1) it's working fine with IE 4.0, not with netscape.

Can you clarify?

Thanks

Raj.
0
Comment
Question by:rajmohans
  • 6
  • 4
  • 2
12 Comments
 
LVL 4

Expert Comment

by:martinag
ID: 1839555
Remove 'this.'

Can't you close it using close()?

Martin
0
 

Author Comment

by:rajmohans
ID: 1839556
Even if I remove this it's not working in Netscape.

If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
0
 

Author Comment

by:rajmohans
ID: 1839557
Even if I remove this it's not working in Netscape.

If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
0
 

Author Comment

by:rajmohans
ID: 1839558
Even if I remove this it's not working in Netscape.

If I try to close it using window.close(), it's displaying a dialog, to confirm the closing of window I'm viewing and if I click Yes it's closed and it's going on hanging with Netscape.
0
 
LVL 4

Expert Comment

by:martinag
ID: 1839559
I have no idea. moveTo() using negative values or values beyond the screen's size won't work either.

Martin
0
 
LVL 4

Accepted Solution

by:
rafistern earned 10 total points
ID: 1839560
This works for me:

zxc=open("index.html","jn","toolbar=yes,width=640,height=440");
window.close();



0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:rajmohans
ID: 1839561
Rafistern

Did you see the dialog to confirm the closing of window, in IE, before closing the window? And is it working in Netscape?

Is there any way of minimizing the window instead of closing?

Raj
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1839562
I didn't get any problems in IE or in NS. I do not think that there is a way to minimize the window. I saw that in IE you had managed by sizing it to 1,1 but that does not appear to work for NS and there is no "official" function to do this.
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1839563
The dialog should appear if you try and close one window from a script running in another but here the closing is done in the same window that is being closed.
0
 

Author Comment

by:rajmohans
ID: 1839564
Rafistern & Martin,

I tried resizing the main window using window.resizeTo(1,1) and found it working in both the browsers.

Can you tell me how to substitute the values for variables rleft and rtop, in window.open

  function makeRemote(URLString)
  {
    var part = URLString;
    wtop=window.top;
    wleft=window.left;
    rtop=wtop;
    if (wleft>600)
       {
         rleft=wleft-200
       }
     else
       {
         rleft=wleft+550
       }
    remote=window.open("","remote","alwaysRaised=Yes,width=200,height=425,left="+rleft+",top="+rtop+",scrollbars=no");
    remote.location.href=(URLString);
    if (remote.opener==null) remote.opener=window;
    remote.opener.name="opener";
  }

I'm trying to launch the remote, based on the position of the main window, but it is launching at top left.

Raj.
0
 
LVL 4

Expert Comment

by:rafistern
ID: 1839565
I would use moveTo to position the window as this is more widely supported.
0
 

Author Comment

by:rajmohans
ID: 1839566
I prefer resizeTo or close rather than moveTo though it works fine.


0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now