android/phonegap Uncaught ReferenceError

account_circle Unassigned
schedule 3 Days
account_balance_wallet $5

]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);


Mar 23rd, 2018

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.
Jun 14th, 2015

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
Mar 23rd, 2018
Mar 23rd, 2018
Mar 24th, 2018
Mark as Final Answer
Unmark as Final Answer
Final Answer

Secure Information

Content will be erased after question is completed.

Final Answer