473,387 Members | 1,303 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

window.open , window.close

Hi,

When opening a page, i want to open a new javascript window and close
the first.

like:

<script language=javascript>
function openw(){
window.open('xxx.php','xxx','menubar=no,scrollbars =no,resizable=no');
window.close()
}
</script>
<body onload=openw()>
Is there a way NOT to get the promt ?:

The web page you are viewing is trying to close the window.
Do yoy like to close the window ? Yes/No

Thanks,
Vagelis

Jul 23 '05 #1
4 3712
vagos wrote:
When opening a page, i want to open a new javascript window and close
the first.
Whatever for? More likely you just want to control what browser controls the
user has, or the window size - but why?
Is there a way NOT to get the promt ?:


No. Any window not opened by a script cannot be closed by a script without
permission from the user.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2
Thanks for replying,

I need a fixed size - which i can do in the same window with resizeto()
and not open a new one- , but is there a way to remove the toolbar and
addres bar from the curent window ??

David Dorward wrote:
vagos wrote:

When opening a page, i want to open a new javascript window and close
the first.

Whatever for? More likely you just want to control what browser controls the
user has, or the window size - but why?

Is there a way NOT to get the promt ?:

No. Any window not opened by a script cannot be closed by a script without
permission from the user.


Jul 23 '05 #3
vagos wrote:
Thanks for replying,
A: Putting the response before that which is being responded to.
Q: What is a really silly means of communicating that is frowned upon on
USENET?

http://www.allmyfaqs.com/faq.pl?How_to_post
I need a fixed size
Why? What's wrong with a solid colour border around the content? For that
matter, what's wrong with designing the page to adapt to the window size
that the user has decided suits their desktop?

http://www.allmyfaqs.com/faq.pl?AnySizeDesign
- which i can do in the same window with resizeto()
Many modern browsers allow that bit of JavaScript to be selectively turned
off ... thankfully.
and not open a new one- , but is there a way to remove the toolbar and
addres bar from the curent window ??


No.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #4
DU
vagos wrote:
Thanks for replying,

I need a fixed size -
Why do you need the window that your users, your visitors are going to
be using to view your webpage to be rigidly fixed? What do you think
would be the most flexible, cautious approach when addressing the issue
of user experience?
which i can do in the same window with resizeto()
The very first thing most non-MSIE users do is neutralize web authors
ability to resize and move around javascript-initiated windows. Why?
Because web authors have over the years abused such abilities to "toy"
with the window size and position of users. And because users can and
should be the one who command the size and position of the window.
Absolute veto should go in the final analysis to the people using a
feature: browser manufacturers (Opera, Safari, Mozilla) agree with such
policy.
and not open a new one- , but is there a way to remove the toolbar and
addres bar from the curent window ??


Why do you need to remove the toolbar and address bar of the current
browser window of your users, of your website visitors? Do you think
doing so can improve the quality of the content you are posting in such
window or can improve the user experience in some way?

DU
--
Answer: top-posting
Question: what's the most annoying way to post in newsgroups?
Jul 23 '05 #5

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

Similar topics

5
by: Matt Kruse | last post by:
See: http://www.mattkruse.com/temp/window_closed.html It looks like the .closed property of a window is inaccessible if the window is actually closed. Other browsers have no problem detecting...
2
by: Irvin Amoraal | last post by:
Process: I have a form which uploads a file from client to server written in PHP. When the user presses the submit button, I use the "onSubmit" event to execute javascript to open a child window...
3
by: Steve | last post by:
Hi, I have a nice little script that works well displaying images on my website. It's a script where if you clik a thumbnail image a pop up window opens that contains a larger version of the same...
6
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
6
by: news.versatel.de | last post by:
Hello NG, I am using javascript to open a new window like this: printpreview=window.open('printview.php','printprev','width=600,height=600'); The new window has a layer called preview: ...
7
by: mg | last post by:
I need to first open WebForm2 from WebForm1 and then close WebForm1 without the end user having to press an OK button before the close can occur. For example, possibly ...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
2
by: jackson2005 | last post by:
OK, I need to do three different things. On the ONLOAD event I would like a popup box to open. In this popup box I need two text boxes. One for the UserName and one for the BillingTo name. ...
3
by: Roger Withnell | last post by:
I am using the following function to open a new window in which to display a larger image on clicking a thumbnail image. function OpenNewWindow(src, vName, vWidth, vHeight, ......) { var...
7
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.