Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #8551 > unrolled thread

Closing a tab in mobile safari

Started byAndrew Poulos <ap_prog@hotmail.com>
First post2011-11-23 16:00 +1100
Last post2011-11-24 16:11 +1100
Articles 3 — 1 participant

Back to article view | Back to comp.lang.javascript


Contents

  Closing a tab in mobile safari Andrew Poulos <ap_prog@hotmail.com> - 2011-11-23 16:00 +1100
    Re: Closing a tab in mobile safari Andrew Poulos <ap_prog@hotmail.com> - 2011-11-23 21:26 +1100
      Re: Closing a tab in mobile safari Andrew Poulos <ap_prog@hotmail.com> - 2011-11-24 16:11 +1100

#8551 — Closing a tab in mobile safari

FromAndrew Poulos <ap_prog@hotmail.com>
Date2011-11-23 16:00 +1100
SubjectClosing a tab in mobile safari
Message-ID<DMCdnZcnnfSX41HTnZ2dnUVZ_vKdnZ2d@westnet.com.au>
I have a web page that when the user clicks a link opens a new window. 
On Safari in iOS 5 the window opens in a tab.

The user is meant to interact with the data on the new window. After 
they do so the window is meant to close to return them to the opener.

Alas, using window.close(); in the opened window/tab closes all tabs 
including the opener.

I then tried window.opener.outline.close(); ('outline' being the name I 
gave to the new window) but again all the tabs were closed.

How can I close just the opened window/tab from within itself with 
Safari on iOS 5?

Andrew Poulos

[toc] | [next] | [standalone]


#8556

FromAndrew Poulos <ap_prog@hotmail.com>
Date2011-11-23 21:26 +1100
Message-ID<tJ-dnQRZSuH_V1HTnZ2dnUVZ_t2dnZ2d@westnet.com.au>
In reply to#8551
On 23/11/2011 4:00 PM, Andrew Poulos wrote:
> I have a web page that when the user clicks a link opens a new window.
> On Safari in iOS 5 the window opens in a tab.
>
> The user is meant to interact with the data on the new window. After
> they do so the window is meant to close to return them to the opener.
>
> Alas, using window.close(); in the opened window/tab closes all tabs
> including the opener.
>
> I then tried window.opener.outline.close(); ('outline' being the name I
> gave to the new window) but again all the tabs were closed.
>
> How can I close just the opened window/tab from within itself with
> Safari on iOS 5?

What's weird is that if I add a link with an onclick, and touch it, then 
just the tab will close ie. with a link like:

<a href="#" onclick="window.close(); return false;">close outline</a>

And I tried using initEvent to trigger a mouse click on the link and 
still all tabs closed :-(

Andrew Poulos

[toc] | [prev] | [next] | [standalone]


#8593

FromAndrew Poulos <ap_prog@hotmail.com>
Date2011-11-24 16:11 +1100
Message-ID<f-udnXMj2pWZT1DTnZ2dnUVZ_r2dnZ2d@westnet.com.au>
In reply to#8556
On 23/11/2011 9:26 PM, Andrew Poulos wrote:
> On 23/11/2011 4:00 PM, Andrew Poulos wrote:
>> I have a web page that when the user clicks a link opens a new window.
>> On Safari in iOS 5 the window opens in a tab.
>>
>> The user is meant to interact with the data on the new window. After
>> they do so the window is meant to close to return them to the opener.
>>
>> Alas, using window.close(); in the opened window/tab closes all tabs
>> including the opener.
>>
>> I then tried window.opener.outline.close(); ('outline' being the name I
>> gave to the new window) but again all the tabs were closed.
>>
>> How can I close just the opened window/tab from within itself with
>> Safari on iOS 5?
>
> What's weird is that if I add a link with an onclick, and touch it, then
> just the tab will close ie. with a link like:
>
> <a href="#" onclick="window.close(); return false;">close outline</a>
>
> And I tried using initEvent to trigger a mouse click on the link and
> still all tabs closed :-(

Well the issue did have a solution after all. Though the guy who 
provided it doesn't want me to post about it :-(

Andrew Poulos

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web