473,573 Members | 2,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to auto close the parent / opener window without confirmation!

Anyone know how to auto close the parent / opener window without
confirmation? I have tried:

<script>
opener.window.c lose()
</script>

----I put it in the child html page, and nothing happen!!---


<script>
self.close()
</script>

---- I put this in the parent html page, and it ask me to confirm and
does not open the child page until I hit no... then the parent page
remains open-----
Is there a way to close parent page at the same time child page is
close or close parent page upon child page open?

Sincerely,
Perry
Jul 23 '05 #1
28 14235
PerryC wrote:
Anyone know how to auto close the parent / opener window without
confirmation?

Yes, I know how, in 90% or so of the cases.
I have tried:

<script>
opener.window.c lose()
</script>

----I put it in the child html page, and nothing happen!!---

You should have gotten a dialog window asking if you want to allow
script to close the window (what browser did you test it in?)


<script>
self.close()
</script>

---- I put this in the parent html page, and it ask me to confirm and
does not open the child page until I hit no... then the parent page
remains open-----
Yep, thats the way it works (some of the time)

Is there a way to close parent page at the same time child page is
close or close parent page upon child page open?


Yes, in 90% or so of the browsers on the web.

The Unconditional Truth will set you free though.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
OK, Randy, So you know how... do you mind sharing? I am not able to do
so... with the codes I put there... any insight? I am using IE6. How
can I get rid of the confirmation popup? Or, better yet, how can I open
the child window and close the parent window automatically? What code
to use??

Sincerely,
PC
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
Perry Cheng wrote:
OK, Randy, So you know how... do you mind sharing? I am not able to
do so... with the codes I put there... any insight? I am using IE6.
How can I get rid of the confirmation popup? Or, better yet, how can
I open the child window and close the parent window automatically?
What code to use??

<snip>

The fact that Randy knows and is not telling is significant. An archive
search at groups.google.c om will reveal the explanation/context and also
the code for the antisocial hack needed.

Richard.
Jul 23 '05 #4
OK, Richard... I am puzzled... what I am asking is related to hacking???
I did my homework before coming here... and ask... I did search not only
google, but also other places... all that is telling me is not exactly
what I have described here... (see previous posts). So, can you or
someone point to me where I can find these info?

What I really need is to click on a html file (run on my Desktop, not
for the web) and it will open up in full screen...

I was not able to do so, so, to get around it... I write another html
with javascripts to open the original html file (in full screen, without
toolbars...) However, now, I have 2 windows... so that is why I am
seeking a way to close the opener!

If someone can share how to accomplish my original intent, that will be
the best.

Sincerely,
Perry

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #5
Lee
Perry Cheng said:

OK, Richard... I am puzzled... what I am asking is related to hacking???
It's not related to hacking. He called it an antisocial hack.
In this case, it's a hack in the sense that it's code that does
something that you normally shouldn't do, and that shouldn't
really be expected to work, but that does work in some cases.

It's anti-social in the sense that closing a person's window is
extremely rude. Maybe they had some more use for it. In this
case, it's your own window, but people are still justified in
hesitating to post the code.
What I really need is to click on a html file (run on my Desktop, not
for the web) and it will open up in full screen...

I was not able to do so, so, to get around it... I write another html
with javascripts to open the original html file (in full screen, without
toolbars...) However, now, I have 2 windows... so that is why I am
seeking a way to close the opener!


But you don't need to close the opener from the new window.
Why not have the original window [try to] close itself after
opening the new window? You should have found methods to do
that in some browsers.

You might also look into HTA's, if what you want is an icon
on your Windows desktop that you can click and launch a web
application.
Jul 23 '05 #6
In article <ea************ **************@ posting.google. com>,
pe******@yahoo. com enlightened us with...
Anyone know how to auto close the parent / opener window without
confirmation?


You can't do that *without confirmation* in a normal internet
environment.

Use an HTA if it is for your own use on a windows PC with IE.

And it's
self.opener.clo se();
in the child window, IIRC.

--
--
~kaeli~
Going to church doesn't make you a Christian any more than
standing in a garage makes you a car.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #7
Perry Cheng wrote:
OK, Randy, So you know how... do you mind sharing? I am not able to do
so... with the codes I put there... any insight? I am using IE6. How
can I get rid of the confirmation popup? Or, better yet, how can I open
the child window and close the parent window automatically? What code
to use??


The reason you get the confirmation window is because you are attempting
to close a window that script didn't open. The way that script (or the
browser) determines whether you opened it with script or not is checking
the window.opener property.

The reason I didn't post the code (as has been pointed out) is that its
anti-social to be closing windows without permission.

Do a search of the archives for "unconditio nal truth".
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 23 '05 #8
Perry Cheng wrote:
OK, Richard... I am puzzled... what I am asking is related to hacking???


Your Question Mark key is borken. [psf 2.3]

Yes, as "hacking" is jargon for "solving problems", and in the context
of software development, it just means developing and implementing an
algorithm that solves a problem. You confuse that with "cracking", a
common misconception, most certainly influenced by the media who tend
to speak of "evil hackers". Hackers are not bad, crackers are.
Hackers build, crackers destroy. As you destroy the reliability of the
user interface if you would succeed doing what you intend to do, you
would be a cracker.

<http://www.catb.org/~esr/faqs/hacker-howto.html>
PointedEars
Jul 23 '05 #9
Thomas 'PointedEars' Lahn <Po*********@nu rfuerspam.de> writes:
Yes, as "hacking" is jargon for "solving problems", ...
You confuse that with "cracking", a common misconception,


It's a common misconception in some circles that they get to define
the word "hacker". In the strictest sense, it means someone who hacks
wood. Other meanings exist, and while a small minority insists that
it cannot mean someone who illegally accesses computers, that is the
common and accepted use of the word for the rest of the world.
<URL:http://www.cbc.ca/news/indepth/words/hack.html>
<URL:http://coscorrosa.com/writing/rants/hacker-cracker.php>
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5160
by: J P Singh | last post by:
Hi Guys Wonder if someone can help me with this. I have a form where a user clicks a button which gives them a pop up windows to allow them to add the data. The user adds the data and click save. The pop window closes and refreshs the parent window to allow the entered data to be displayed. It was all working okay until couple of days...
3
4683
by: Alan | last post by:
When using "window.close", a dialog box ask u to comfirm, how to disable it ?
1
3715
by: Marshall Dudley | last post by:
I have an application where in a shopping cart checkout a popup appears which suggests other items that may go with what was ordered with a button to add these items to the cart. When the button in the popup is clicked, the popup should present an added items to cart message, close, and reload the parent window, so the parent will show the...
4
1913
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using javascript) with a datagrid of these partial match records (by doing a sqlcommand using some query string values taken from opener data entered) ***...
7
19261
by: MichaelK | last post by:
What's the best way to close current window silently after finished a process. I'm using the the javascritpt window.close() or top.window.close(), but it fires a confirmation window. Just want to close it without any confirmation, seems I done it before, but can't find where. Thanks, Michael.
7
2503
by: Jaggu | last post by:
Hi , I need to close main window, once the child window succesfully opens else main window to remain. In my case when I close the main window immediately after the "window.open()" as mentioned below, both the main and child disappears(this is due to pop up blocker) disappears suddenly. I want to make the browser know if pop up blocks the...
7
5805
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed to be two techniques for earlier versions. But the window.opener='' ;window.close(); and the window.open('','_parent','') ;window.close(); ...
1
4464
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The parent window name is "main". A made a link like this in the child-site: <a href="new_address.html" target="main" class="about"...
6
3235
by: =?Utf-8?B?UGF1bA==?= | last post by:
I am looking for a java script to close a web form that I can attatch to a button click event. I am using vs2005, c#. Thanks -- Paul G Software engineer.
0
7784
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7704
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8204
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7795
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8073
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6424
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5600
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3735
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1044
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.