Titanium JIRA Archive
Appcelerator Community (AC)

[AC-895] Uncaught TypeError: undefined is not a function at /index.html (line 92)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-09-15T07:31:04.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator CLI, Appcelerator Modules, Studio, Titanium SDK & CLI
Labelsandroid, studio3
ReporterROHIT YADAV
AssigneeShak Hossain
Created2014-09-07T05:07:29.000+0000
Updated2016-03-08T07:37:12.000+0000

Description

how to resolve this error from the web page at http://127.0.0.1:8020/index.html. this error comes every time when i create any html5 based application on titanium studio latest (just downloaded)....

Comments

  1. Jason Rose 2015-02-23

    I just ran into this as well, trying out Titanium for the first time.
  2. Rakhi Mitro 2015-08-31

    Hello, I have tested this issue in my updated environment. This is not a bug for latest Appcelerator version. Not sure if this is still an issue for you. It doesn't appear to be based on our latest tests. Please let me know how I can help further. *Test Environments:* CLI Version :4.0.1 Titanium SDK Version:4.1.0.GA Android: Google Galaxy Nexus:4.1.1 - API 16 - 720x1280 Appc Studio: Appcelerator Studio, build: 4.1.1.201507141126 Alloy: 1.7.3 Target Platform = mobile web *Test code:* *app.js*
       
          var win = Titanium.UI.createWindow();
           var webview = Ti.UI.createWebView({
               url: 'test.html'
           });
           win.add(webview);
            
           webview.addEventListener('load',function(e) {
              
              
               var response = e.source.evalJS('(p = document.getElementById("oauth_pin")) && p.innerHTML');
           
              
           });
           
           win.open();
       
       
       
    *test.html*
       <!DOCTYPE html>
       
       <html>
       
       <body>
       
       <article>
       
         <h1>What Does WWF Do?</h1>
       
         <p id="oauth_pin">WWF's mission is to stop the degradation of our planet's natural environment, and build a future in which humans live in harmony with nature.</p>
       
       </article>
       
       
       
       </body>
       
       </html>
       
       
    *Test Steps:*

    Create web view on app.js .

    Create a text.html using html5 elements .

    Add load event listener on window

    Call evalJS function into load event.

    Run the project using Mobile Web Preview in Browser.

    Test Result: Project builds successfully without any error in web browser. Check [this ](http://i59.tinypic.com/k20kdj.png). Thanks

JSON Source