Connecting Tech Pros Worldwide Forums | Help | Site Map

window.open , window.close

vagos
Guest
 
Posts: n/a
#1: Jul 23 '05
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


David Dorward
Guest
 
Posts: n/a
#2: Jul 23 '05

re: window.open , window.close


vagos wrote:
[color=blue]
> When opening a page, i want to open a new javascript window and close
> the first.[/color]

Whatever for? More likely you just want to control what browser controls the
user has, or the window size - but why?
[color=blue]
> Is there a way NOT to get the promt ?:[/color]

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
vagos
Guest
 
Posts: n/a
#3: Jul 23 '05

re: window.open , window.close


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:[color=blue]
> vagos wrote:
>
>[color=green]
>>When opening a page, i want to open a new javascript window and close
>>the first.[/color]
>
>
> Whatever for? More likely you just want to control what browser controls the
> user has, or the window size - but why?
>
>[color=green]
>>Is there a way NOT to get the promt ?:[/color]
>
>
> No. Any window not opened by a script cannot be closed by a script without
> permission from the user.
>
>[/color]

David Dorward
Guest
 
Posts: n/a
#4: Jul 23 '05

re: window.open , window.close


vagos wrote:
[color=blue]
> Thanks for replying,[/color]

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
[color=blue]
> I need a fixed size[/color]

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
[color=blue]
> - which i can do in the same window with resizeto()[/color]

Many modern browsers allow that bit of JavaScript to be selectively turned
off ... thankfully.
[color=blue]
> and not open a new one- , but is there a way to remove the toolbar and
> addres bar from the curent window ??[/color]

No.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
DU
Guest
 
Posts: n/a
#5: Jul 23 '05

re: window.open , window.close


vagos wrote:
[color=blue]
> Thanks for replying,
>
> I need a fixed size -[/color]

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?
[color=blue]
> which i can do in the same window with resizeto()[/color]

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.
[color=blue]
> and not open a new one- , but is there a way to remove the toolbar and
> addres bar from the curent window ??
>[/color]

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?
Closed Thread