incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (CB-62) Unable to use JavaScript to redirect to a different page.
Date Mon, 06 Feb 2012 22:08:59 GMT


Shazron Abdullah resolved CB-62.

    Resolution: Won't Fix

Workaround is to use the JS function here:

function openInWebView(url)
        var anchor = document.createElement('a');
        anchor.setAttribute('href', url);
        anchor.setAttribute('target', '_self');
        var dispatch = document.createEvent('HTMLEvents')
        dispatch.initEvent('click', true, true);
> Unable to use JavaScript to redirect to a different page.
> ---------------------------------------------------------
>                 Key: CB-62
>                 URL:
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
> **Summary:** You can no longer redirect to a different page by updating `document.location.href`.
> reported at:
> by:
> **To reproduce:** Add `` to `PhoneGap.plist`'s `ExternalHosts` array. Add
an anchor link to `index.html` with its `onclick` handler set to use JavaScript to redirect
the webView to``.
>     <a href="#" onclick="document.location.href=''; return false;">click
> **Expected:** Clicking the anchor link will load `` in the embedded
> **Actual:** Clicking the anchor link loads `` in Mobile Safari.
> For more info, see:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message