RE: Closing a window from JS without prompt?

2002-02-27 Thread Matthew R. Small

You can't do it.  In the security model of Javascript the only windows
that can be closed are the child windows. At least, that's what I've
been taught.

- Matt Small

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 2:04 PM
To: CF-Talk
Subject: OT: Closing a window from JS without prompt?

I'm looking for ideas on how to close a Parent window from Javascript
without getting the confirmation prompt.
We don't have an issue with any child windows, but we open an interface
to
our app then want to close the original window without the prompt.

Any tips?  Thanks in advance.

Shawn Grover

__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Closing a window from JS without prompt?

2002-02-27 Thread Justin Waldrip

I have an app that opens up a window full screen and then I need to
close the parent window that is behind it. So what I did was added the
object code below to the head and then refresh the parent window with
the onload function that initiates and closes the parent window. Works
like a champ for me. You might have to play around with it depending on
your need.

html
head
titleUntitled/title
!--- // Must have this in the head // ---
object id=closes type=application/x-oleobject
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11
param name=Command value=Close
/object
/head

script
function closeme() {
closes.Click();
}
/script


body onload=document.form.CloseArea.focus();

form
input type=text name=CloseArea onfocus=closeme()
style=width: 0px;
/form

/body
/html

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 1:04 PM
To: CF-Talk
Subject: OT: Closing a window from JS without prompt?

I'm looking for ideas on how to close a Parent window from Javascript
without getting the confirmation prompt.
We don't have an issue with any child windows, but we open an interface
to
our app then want to close the original window without the prompt.

Any tips?  Thanks in advance.

Shawn Grover

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Closing a window from JS without prompt?

2002-02-27 Thread Scott Van Vliet

Does this work in NN 4.7?

-Original Message-
From: Justin Waldrip [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 11:18 AM
To: CF-Talk
Subject: RE: Closing a window from JS without prompt?

I have an app that opens up a window full screen and then I need to
close the parent window that is behind it. So what I did was added the
object code below to the head and then refresh the parent window with
the onload function that initiates and closes the parent window. Works
like a champ for me. You might have to play around with it depending on
your need.

html
head
titleUntitled/title
!--- // Must have this in the head // ---
object id=closes type=application/x-oleobject
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11
param name=Command value=Close
/object
/head

script
function closeme() {
closes.Click();
}
/script


body onload=document.form.CloseArea.focus();

form
input type=text name=CloseArea onfocus=closeme()
style=width: 0px;
/form

/body
/html

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 1:04 PM
To: CF-Talk
Subject: OT: Closing a window from JS without prompt?

I'm looking for ideas on how to close a Parent window from Javascript
without getting the confirmation prompt.
We don't have an issue with any child windows, but we open an interface
to
our app then want to close the original window without the prompt.

Any tips?  Thanks in advance.

Shawn Grover


__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Closing a window from JS without prompt?

2002-02-27 Thread Macarie Neculai

Hi!

As far as I know you cannot close a parent window from a child, but I
think you can try something like this:
1. call setTimeout(closeFunction, 2000)
2. open the child window from the parent
3. in closeFunction you close your parent window and I think you get no
confirmation promt.

HTH,
Mack


- Original Message -
From: Shawn Grover [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 11:04 AM
Subject: OT: Closing a window from JS without prompt?


 I'm looking for ideas on how to close a Parent window from Javascript
 without getting the confirmation prompt.
 We don't have an issue with any child windows, but we open an interface to
 our app then want to close the original window without the prompt.

 Any tips?  Thanks in advance.

 Shawn Grover
 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Closing a window from JS without prompt?

2002-02-27 Thread savan . thongvanh

that snippet didn't work in either NS or IE for me

IE didn't even load the page and NS bombed because it said that closes 
was
not defined

i just pasted that snippet into a page.

is there something else that needs to be done?




Justin Waldrip [EMAIL PROTECTED] on 02/27/2002 01:17:54 PM

Please respond to [EMAIL PROTECTED]

To:   CF-Talk [EMAIL PROTECTED]
cc:

Subject:  RE: Closing a window from JS without prompt?


I have an app that opens up a window full screen and then I need to
close the parent window that is behind it. So what I did was added th
e
object code below to the head and then refresh the parent window with
the onload function that initiates and closes the parent window. Work
s
like a champ for me. You might have to play around with it depending 
on
your need.

html
head
 titleUntitled/title
 !--- // Must have this in the head // ---
 object id=closes type=application/x-oleobject
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11
  param name=Command value=Close
 /object
/head

script
function closeme() {
 closes.Click();
}
/script


body onload=document.form.CloseArea.focus();

form
 input type=text name=CloseArea onfocus=closeme()
style=width: 0px;
/form

/body
/html

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 1:04 PM
To: CF-Talk
Subject: OT: Closing a window from JS without prompt?

I'm looking for ideas on how to close a Parent window from Javascript
without getting the confirmation prompt.
We don't have an issue with any child windows, but we open an interface

to
our app then want to close the original window without the prompt.

Any tips?  Thanks in advance.

Shawn Grover


__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Closing a window from JS without prompt?

2002-02-27 Thread Justin Waldrip

Not sure I don't use NN.

-Original Message-
From: Scott Van Vliet [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 1:25 PM
To: CF-Talk
Subject: RE: Closing a window from JS without prompt?

Does this work in NN 4.7?

-Original Message-
From: Justin Waldrip [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 11:18 AM
To: CF-Talk
Subject: RE: Closing a window from JS without prompt?

I have an app that opens up a window full screen and then I need to
close the parent window that is behind it. So what I did was added the
object code below to the head and then refresh the parent window with
the onload function that initiates and closes the parent window. Works
like a champ for me. You might have to play around with it depending on
your need.

html
head
titleUntitled/title
!--- // Must have this in the head // ---
object id=closes type=application/x-oleobject
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11
param name=Command value=Close
/object
/head

script
function closeme() {
closes.Click();
}
/script


body onload=document.form.CloseArea.focus();

form
input type=text name=CloseArea onfocus=closeme()
style=width: 0px;
/form

/body
/html

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 1:04 PM
To: CF-Talk
Subject: OT: Closing a window from JS without prompt?

I'm looking for ideas on how to close a Parent window from Javascript
without getting the confirmation prompt.
We don't have an issue with any child windows, but we open an interface
to
our app then want to close the original window without the prompt.

Any tips?  Thanks in advance.

Shawn Grover



__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Closing a window from JS without prompt?

2002-02-27 Thread savan . thongvanh

i would use a javascript function to open the window and subsequently c
lose
itself.  If there are any URLs in the history of a window it cannot c
lose,
with javascript, without a prompt (up to IE 5.5 and NS 4.7).  I'm
 not sure
about version 6s.

Savan




Macarie Neculai [EMAIL PROTECTED] on 02/27/2002 11:25:31 PM

Please respond to [EMAIL PROTECTED]

To:   CF-Talk [EMAIL PROTECTED]
cc:

Subject:  Re: Closing a window from JS without prompt?


Hi!

As far as I know you cannot close a parent window from a child, but
 I
think you can try something like this:
1. call setTimeout(closeFunction, 2000)
2. open the child window from the parent
3. in closeFunction you close your parent window and I think you get 
no
confirmation promt.

HTH,
Mack


- Original Message -
From: Shawn Grover [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 11:04 AM
Subject: OT: Closing a window from JS without prompt?


 I'm looking for ideas on how to close a Parent window from Javascript

 without getting the confirmation prompt.
 We don't have an issue with any child windows, but we open an interfa
ce
to
 our app then want to close the original window without the prompt.

 Any tips?  Thanks in advance.

 Shawn Grover


__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Closing a window from JS without prompt?

2002-02-27 Thread Justin Waldrip

Sorry I forgot to name the form. I just tried this and it works on IE.

html
head
titleUntitled/title
!--- // Must have this in the head // ---
object id=closes type=application/x-oleobject
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11
param name=Command value=Close
/object
/head

script
function closeme() {
closes.Click();
}
/script


body onload=document.form.CloseArea.focus();

form name=form
input type=text name=CloseArea onfocus=closeme()
style=width: 0px;
/form

/body
/html

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 27, 2002 1:28 PM
To: CF-Talk
Subject: RE: Closing a window from JS without prompt?

that snippet didn't work in either NS or IE for me

IE didn't even load the page and NS bombed because it said that closes 
was
not defined

i just pasted that snippet into a page.

is there something else that needs to be done?




Justin Waldrip [EMAIL PROTECTED] on 02/27/2002 01:17:54 PM

Please respond to [EMAIL PROTECTED]

To:   CF-Talk [EMAIL PROTECTED]
cc:

Subject:  RE: Closing a window from JS without prompt?


I have an app that opens up a window full screen and then I need to
close the parent window that is behind it. So what I did was added th
e
object code below to the head and then refresh the parent window with
the onload function that initiates and closes the parent window. Work
s
like a champ for me. You might have to play around with it depending 
on
your need.

html
head
 titleUntitled/title
 !--- // Must have this in the head // ---
 object id=closes type=application/x-oleobject
classid=clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11
  param name=Command value=Close
 /object
/head

script
function closeme() {
 closes.Click();
}
/script


body onload=document.form.CloseArea.focus();

form
 input type=text name=CloseArea onfocus=closeme()
style=width: 0px;
/form

/body
/html

-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 1:04 PM
To: CF-Talk
Subject: OT: Closing a window from JS without prompt?

I'm looking for ideas on how to close a Parent window from Javascript
without getting the confirmation prompt.
We don't have an issue with any child windows, but we open an interface

to
our app then want to close the original window without the prompt.

Any tips?  Thanks in advance.

Shawn Grover



__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists