Javascript windowopener.location.reload not working with mobile popup

I have a problem with the following simple javascript function:

I open the popup from the parent page with just a button in the popup that calls the function:

    function closing() {
        try {
            window.opener.location.reload();
            alert("ok");
            window.close();

        } catch (e) { alert(e.description); }
    }

      

It works very simply: it reloads the parent page, alerts with the message "OK" and then closes the popup. It works great with computers: http://www.carnet-de-vol.fr/V2/DGAC/open.aspx

But from mobile phones (iPad or Samsung Galaxy S4), the try / catch test shows an "undefined" error ... it is called by window.opener.location.reload (); lign, but I didn't find why ... I also tried window.opener.reload () etc.

Do you have any ideas?

Sincerely.

J

+3
javascript mobile window.opener


source to share


No one has answered this question yet

Check out similar questions:

7649
How does JavaScript blocking work?
7494
How can I remove a specific element from an array in JavaScript?
7432
How to check if a string contains a substring in JavaScript?
7287
What does "use strict" do in JavaScript, and what are the reasons for it?
5722
How can I remove a property from a JavaScript object?
5670
Which operator is equal (== vs ===) should be used in JavaScript comparisons?
5101
What's the most efficient way to deeply clone an object in JavaScript?
4829
How do I include a JavaScript file in another JavaScript file?
4380
For each by an array in JavaScript?
3842
Create GUID / UUID in JavaScript?



All Articles
Loading...
X
Show
Funny
Dev
Pics