Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

WebView.goBack not working in android

In my application WebView.goBack not working, I have used following code in event listener

backButton.addEventListener('click', function(e){
     Titanium.UI.WebView.goBack();
});

How do I navigate to back?

— asked November 4th 2011 by karthi ponnusamy
  • android
  • back
  • webview
0 Comments

1 Answer

  • Accepted Answer

    You need to call goBack() on an instance of a WebView, not on the WebView module itself. For example:

    var webview = Ti.UI.createWebView({
        url: 'your_url.html'
    });
    backButton.addEventListener('click', function(e){
         webview.goBack();
    });
    
    — answered November 4th 2011 by Tony Lukasavage
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.