incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-62) Unable to use JavaScript to redirect to a different page.
Date Mon, 28 Nov 2011 23:05:40 GMT
Unable to use JavaScript to redirect to a different page.
---------------------------------------------------------

                 Key: CB-62
                 URL: https://issues.apache.org/jira/browse/CB-62
             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: https://github.com/phonegap/phonegap-iphone/issues/270
by: https://github.com/buddydvd

**To reproduce:** Add `www.google.com` 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`http://www.google.com`.

    <a href="#" onclick="document.location.href='http://www.google.com/'; return false;">click
me</a>

**Expected:** Clicking the anchor link will load `http://www.google.com` in the embedded webView.
**Actual:** Clicking the anchor link loads `http://www.google.com` in Mobile Safari.

For more info, see: https://github.com/phonegap/phonegap-iphone/commit/9eaeceb2048427f2349cbd862af2507bddf08f77

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message