I'm using titanium 3.3.0 Alloy project with a webview
Im attempting to use a webView with a text area to display a string which I pass from my controller.
notes.js
$.notes_overlay.addEventListener('load',function() { alert("current note: " + Alloy.Globals.currentNote); //text_area = $.notes_overlay.evalJS('document.getElementById("notes_textarea")'); //text_area.value = Alloy.Globals.currentNote; //neither of these seem to work $.notes_overlay.evalJS('document.getElementById("notes_textarea").value =\"' + Alloy.Globals.currentNote + "\""); $.notes_overlay.evalJS('document.getElementById("notes_textarea").value ="' + Alloy.Globals.currentNote + '"');notes.xml
<Alloy> <Window id="notesWin"> <WebView id="notes_overlay"> </WebView> <ImageView id="topbar"> <Label id="topbar_label"/> <Button id='save_button'/> <Button id='exit_button'/> </ImageView> </Window> </Alloy>notes.html
<html> <head> <title>Local HTML</title> <link rel="stylesheet" type="text/css" href="notes.css"/> </head> <body> <textarea id="notes_textarea" placeholder="Enter your text ..."> </textarea> </body> </html>All I want to do is populate notes_textarea.value with Alloy.Globals.currentNote but everything I have tried ends up with an empty text area after the page loads. Anything obvious that I'm doing wrong here?