471,338 Members | 1,319 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 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 3624
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Irvin Amoraal | last post: by
6 posts views Thread by news.versatel.de | last post: by
2 posts views Thread by jackson2005 | last post: by
3 posts views Thread by Roger Withnell | last post: by

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.