android/phonegap Uncaught ReferenceError

timer Asked: Jun 2nd, 2013
account_balance_wallet $5

Question Description

]I am getting the below exception when i try to invoke a javascript call from an android application that uses PhoneGap.

Stacktrack error:

here is my .jp file


        <!-- register -->


    function register(toggle){

    var e = toggle;

    var value = e.options[e.selectedIndex].value;;;

    if (value == "on"){


    }else if(value == "off"){







      <!-- send  -->


    function send(message){'sending message');;





    <!-- recieve -->


    function recieve(msg){'recieving message');;

    document.getElementById("textarea1").innerHTML = messages;



Here is my android code that creates a javascript:functionName() string and loads it to the webView

[CODE]    String text = "hello";

    String javaScript = "javascript:recieve(\'"+text+"\')";

    Log.d("TAG", javaScript);


Tutor Answer

fitting k
School: New York University

Thank you for the opportunity to help you with your question!

In most cases, the discipline is self-governed by the entities which require the programming, and sometimes very strict environments are defined

Please let me know if you need any clarification. I'm always happy to answer your questions.

flag Report DMCA

Top quality work from this guy! I'll be back!

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors